oz-disable.ll 673 B

123456789101112131415161718192021222324252627282930
  1. ; REQUIRES: asserts
  2. ; RUN: opt < %s -S -Os -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OS
  3. ; RUN: opt < %s -S -Oz -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OZ
  4. ; Loop should be rotated for -Os but not for -Oz.
  5. ; OS: rotating Loop at depth 1
  6. ; OZ-NOT: rotating Loop at depth 1
  7. @e = global i32 10
  8. declare void @use(i32)
  9. define void @test() {
  10. entry:
  11. %end = load i32, i32* @e
  12. br label %loop
  13. loop:
  14. %n.phi = phi i32 [ %n, %loop.fin ], [ 0, %entry ]
  15. %cond = icmp eq i32 %n.phi, %end
  16. br i1 %cond, label %exit, label %loop.fin
  17. loop.fin:
  18. %n = add i32 %n.phi, 1
  19. call void @use(i32 %n)
  20. br label %loop
  21. exit:
  22. ret void
  23. }