[SimplifyLibCalls] Remove useless bits of this tests.
[oota-llvm.git] / test / Transforms / InstCombine / sdiv-1.ll
1 ; RUN: opt < %s -instcombine -inline -S | FileCheck %s
2 ; PR3142
3
4 ; CHECK-NOT: -715827882
5
6 define i32 @a(i32 %X) nounwind readnone {
7 entry:
8        %0 = sub i32 0, %X
9        %1 = sdiv i32 %0, -3
10        ret i32 %1
11 }
12
13 define i32 @b(i32 %X) nounwind readnone {
14 entry:
15        %0 = call i32 @a(i32 -2147483648)
16        ret i32 %0
17 }
18
19 define i32 @c(i32 %X) nounwind readnone {
20 entry:
21        %0 = sub i32 0, -2147483648
22        %1 = sdiv i32 %0, -3
23        ret i32 %1
24 }