undefined.ll 618 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
  2. ; ScalarEvolution shouldn't attempt to interpret expressions which have
  3. ; undefined results.
  4. define void @foo(i64 %x) {
  5. %a = udiv i64 %x, 0
  6. ; CHECK: --> (%x /u 0)
  7. %B = shl i64 %x, 64
  8. ; CHECK: --> %B
  9. %b = ashr i64 %B, 64
  10. ; CHECK: --> %b
  11. %c = lshr i64 %x, 64
  12. ; CHECK: --> %c
  13. %d = shl i64 %x, 64
  14. ; CHECK: --> %d
  15. %E = shl i64 %x, -1
  16. ; CHECK: --> %E
  17. %e = ashr i64 %E, -1
  18. ; CHECK: --> %e
  19. %f = lshr i64 %x, -1
  20. ; CHECK: --> %f
  21. %g = shl i64 %x, -1
  22. ; CHECK: --> %g
  23. %h = bitcast i64 undef to i64
  24. ; CHECK: --> undef
  25. ret void
  26. }