cf030.ll 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ; RUN: %opt-exe %s -scopenested -scopenestinfo -analyze -S | %FileCheck %s
  2. ; CHECK: ScopeNestInfo:
  3. ; CHECK: @TopLevel_Begin
  4. ; CHECK: entry
  5. ; CHECK: @Loop_Begin
  6. ; CHECK: loop0
  7. ; CHECK: @If_Begin
  8. ; CHECK: dx.LoopExitHelper
  9. ; CHECK: @Loop_Break
  10. ; CHECK: @If_Else
  11. ; CHECK: loop0.latch
  12. ; CHECK: dx.LoopContinue
  13. ; CHECK: @Loop_Continue
  14. ; CHECK: @If_End
  15. ; CHECK: dx.LoopLatch
  16. ; CHECK: @Loop_End
  17. ; CHECK: dx.LoopExit
  18. ; CHECK: loop0.exit
  19. ; CHECK: @TopLevel_End
  20. define i32 @main(i1 %c1, i1 %c2, i1 %c3, i32 %i1, i32 %i2) {
  21. entry:
  22. %res = alloca i32
  23. store i32 %i1, i32 *%res
  24. br label %loop0
  25. loop0:
  26. %0 = load i32, i32 *%res
  27. %1 = icmp eq i32 %0, 20
  28. br i1 %1, label %loop0.exit, label %loop0.latch
  29. loop0.latch:
  30. store i32 %i2, i32 *%res
  31. br label %loop0
  32. loop0.exit:
  33. %2 = load i32, i32 *%res
  34. ret i32 %2
  35. }