• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=x86 | FileCheck %s
2
3; CHECK-LABEL: test1:
4; CHECK-NOT: div
5define i32 @test1(i32 %X) {
6        %tmp1 = srem i32 %X, 255                ; <i32> [#uses=1]
7        ret i32 %tmp1
8}
9
10; CHECK-LABEL: test2:
11; CHECK-NOT: div
12define i32 @test2(i32 %X) {
13        %tmp1 = srem i32 %X, 256                ; <i32> [#uses=1]
14        ret i32 %tmp1
15}
16
17; CHECK-LABEL: test3:
18; CHECK-NOT: div
19define i32 @test3(i32 %X) {
20        %tmp1 = urem i32 %X, 255                ; <i32> [#uses=1]
21        ret i32 %tmp1
22}
23
24; CHECK-LABEL: test4:
25; CHECK-NOT: div
26define i32 @test4(i32 %X) {
27        %tmp1 = urem i32 %X, 256                ; <i32> [#uses=1]
28        ret i32 %tmp1
29}
30
31; CHECK-LABEL: test5:
32; CHECK-NOT: cltd
33define i32 @test5(i32 %X) nounwind readnone {
34entry:
35	%0 = srem i32 41, %X
36	ret i32 %0
37}
38