1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -inline -S | FileCheck %s
5 define i32 @a(i32 %X) {
7 ; CHECK-NEXT: [[T0:%.*]] = sub i32 0, [[X:%.*]]
8 ; CHECK-NEXT: [[T1:%.*]] = sdiv i32 [[T0]], -3
9 ; CHECK-NEXT: ret i32 [[T1]]
12 %t1 = sdiv i32 %t0, -3
16 define i32 @b(i32 %X) {
18 ; CHECK-NEXT: ret i32 715827882
20 %t0 = call i32 @a(i32 -2147483648)
24 define i32 @c(i32 %X) {
26 ; CHECK-NEXT: ret i32 715827882
28 %t0 = sub i32 0, -2147483648
29 %t1 = sdiv i32 %t0, -3