cf006.ll 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ; RUN: %opt-exe %s -scopenested -scopenestinfo -analyze -S | %FileCheck %s
  2. ; CHECK: ScopeNestInfo:
  3. ; CHECK: @TopLevel_Begin
  4. ; CHECK: entry
  5. ; CHECK: @If_Begin
  6. ; CHECK: if0.T
  7. ; CHECK: @If_Begin
  8. ; CHECK: if1.T
  9. ; CHECK: @If_Else
  10. ; CHECK: if1.F
  11. ; CHECK: @If_End
  12. ; CHECK: dx.EndIfScope.1
  13. ; CHECK: if1.end
  14. ; CHECK: @If_Else
  15. ; CHECK: if0.F
  16. ; CHECK: @If_Begin
  17. ; CHECK: if2.T
  18. ; CHECK: @If_Else
  19. ; CHECK: if2.F
  20. ; CHECK: @If_End
  21. ; CHECK: dx.EndIfScope.2
  22. ; CHECK: if2.end
  23. ; CHECK: @If_End
  24. ; CHECK: dx.EndIfScope
  25. ; CHECK: if0.end
  26. ; CHECK: @TopLevel_End
  27. define i32 @main(i1 %c1, i1 %c2, i1 %c3, i32 %i1, i32 %i2) {
  28. entry:
  29. %res = alloca i32
  30. store i32 1, i32 *%res
  31. br i1 %c1, label %if0.T, label %if0.F
  32. if0.T:
  33. store i32 2, i32 *%res
  34. br i1 %c2, label %if1.T, label %if1.F
  35. if1.T:
  36. store i32 5, i32 *%res
  37. br label %if1.end
  38. if1.F:
  39. store i32 6, i32 *%res
  40. br label %if1.end
  41. if1.end:
  42. store i32 8, i32 *%res
  43. br label %if0.end
  44. if0.F:
  45. store i32 3, i32 *%res
  46. br i1 %c3, label %if2.T, label %if2.F
  47. if2.T:
  48. store i32 9, i32 *%res
  49. br label %if2.end
  50. if2.F:
  51. store i32 10, i32 *%res
  52. br label %if2.end
  53. if2.end:
  54. store i32 11, i32 *%res
  55. br label %if0.end
  56. if0.end:
  57. %0 = load i32, i32 *%res
  58. ret i32 %0
  59. }