24 lines · plain
1; This is a basic correctness check for constant propagation. It tests the2; basic arithmetic operations.3 4 5; RUN: opt < %s -passes=sccp -S | not grep mul6; RUN: opt < %s -passes=sccp -S | not grep umod7 8define i128 @test(i1 %B) {9 br i1 %B, label %BB1, label %BB210BB1:11 %t1 = add i128 0, 112 %t2 = sub i128 0, %t113 %t3 = mul i128 %t2, -114 br label %BB315BB2:16 %f1 = udiv i128 -1, 117 %f2 = add i128 %f1, 118 %f3 = urem i128 %f2, 212119 br label %BB320BB3:21 %Ret = phi i128 [%t3, %BB1], [%f3, %BB2]22 ret i128 %Ret23}24