cf007.ll 1.3 KB

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