apint-basictest3.ll 527 B

1234567891011121314151617181920212223
  1. ; This is a basic sanity check for constant propagation. It tests the basic
  2. ; arithmatic operations.
  3. ; RUN: opt < %s -sccp -S | not grep mul
  4. ; RUN: opt < %s -sccp -S | not grep umod
  5. define i128 @test(i1 %B) {
  6. br i1 %B, label %BB1, label %BB2
  7. BB1:
  8. %t1 = add i128 0, 1
  9. %t2 = sub i128 0, %t1
  10. %t3 = mul i128 %t2, -1
  11. br label %BB3
  12. BB2:
  13. %f1 = udiv i128 -1, 1
  14. %f2 = add i128 %f1, 1
  15. %f3 = urem i128 %f2, 2121
  16. br label %BB3
  17. BB3:
  18. %Ret = phi i128 [%t3, %BB1], [%f3, %BB2]
  19. ret i128 %Ret
  20. }