xref: /llvm-project/llvm/test/Transforms/Reassociate/min_int.ll (revision 0676acb6fd8d5e22fde16e6ec977ceac08427ab0)
1; RUN: opt < %s -passes=reassociate,dce -S | FileCheck %s
2
3; MIN_INT cannot be negated during reassociation
4
5define i32 @minint(i32 %i) {
6; CHECK:  %mul = mul i32 %i, -2147483648
7; CHECK-NEXT:  %add = add i32 %mul, 1
8; CHECK-NEXT:  ret i32 %add
9  %mul = mul i32 %i, -2147483648
10  %add = add i32 %mul, 1
11  ret i32 %add
12}
13
14