cf048.ll 1000 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ; RUN: %opt-exe %s -scopenested -scopenestinfo -analyze -S | %FileCheck %s
  2. ; CHECK: ScopeNestInfo:
  3. ; CHECK: @TopLevel_Begin
  4. ; CHECK: entry
  5. ; CHECK: if0
  6. ; CHECK: @If_Begin
  7. ; CHECK: if0.T
  8. ; CHECK: @Loop_Begin
  9. ; CHECK: loop0
  10. ; CHECK: loop0.latch
  11. ; CHECK: dx.LoopContinue
  12. ; CHECK: @Loop_Continue
  13. ; CHECK: dx.LoopLatch
  14. ; CHECK: @Loop_End
  15. ; CHECK: @If_Else
  16. ; CHECK: if0.F
  17. ; CHECK: if0.exit
  18. ; CHECK: @If_End
  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 %if0
  25. if0:
  26. br i1 %c1, label %if0.T, label %if0.F
  27. if0.T:
  28. br label %loop0
  29. loop0:
  30. %0 = load i32, i32 *%res
  31. %1 = icmp eq i32 %0, 20
  32. br label %loop0.latch
  33. loop0.latch:
  34. store i32 %i2, i32 *%res
  35. br label %loop0
  36. if0.F:
  37. store i32 22, i32 *%res
  38. br label %if0.exit
  39. if0.exit:
  40. %2 = load i32, i32 *%res
  41. ret i32 %2
  42. }