aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/sdiv-1.ll
blob: c46b5eaef4a87f2cdc7bb26a4cb204169c42d7d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: opt < %s -instcombine -inline -S | not grep '-715827882'
; PR3142

define i32 @a(i32 %X) nounwind readnone {
entry:
       %0 = sub i32 0, %X
       %1 = sdiv i32 %0, -3
       ret i32 %1
}

define i32 @b(i32 %X) nounwind readnone {
entry:
       %0 = call i32 @a(i32 -2147483648)
       ret i32 %0
}

define i32 @c(i32 %X) nounwind readnone {
entry:
       %0 = sub i32 0, -2147483648
       %1 = sdiv i32 %0, -3
       ret i32 %1
}