aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/rem.ll
blob: 394070ecdf23599e16d2443726c44244a2372bce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llc < %s -march=x86 | not grep div

define i32 @test1(i32 %X) {
        %tmp1 = srem i32 %X, 255                ; <i32> [#uses=1]
        ret i32 %tmp1
}

define i32 @test2(i32 %X) {
        %tmp1 = srem i32 %X, 256                ; <i32> [#uses=1]
        ret i32 %tmp1
}

define i32 @test3(i32 %X) {
        %tmp1 = urem i32 %X, 255                ; <i32> [#uses=1]
        ret i32 %tmp1
}

define i32 @test4(i32 %X) {
        %tmp1 = urem i32 %X, 256                ; <i32> [#uses=1]
        ret i32 %tmp1
}