cf047.ll 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: if0
  8. ; CHECK: @If_Begin
  9. ; CHECK: if0.T
  10. ; CHECK: @If_Else
  11. ; CHECK: if0.F
  12. ; CHECK: @If_End
  13. ; CHECK: dx.EndIfScope
  14. ; CHECK: if0.exit
  15. ; CHECK: dx.LoopContinue
  16. ; CHECK: @Loop_Continue
  17. ; CHECK: loop0.latch
  18. ; CHECK: @Loop_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 %loop0
  25. loop0:
  26. %loop0.0 = load i32, i32 *%res
  27. %loop0.1 = icmp eq i32 %loop0.0, 20
  28. br label %if0
  29. if0:
  30. br i1 %c1, label %if0.T, label %if0.F
  31. if0.T:
  32. %if0.T.0 = load i32, i32 *%res
  33. %if0.T.1 = add i32 %if0.T.0, 1
  34. store i32 %if0.T.1, i32 *%res
  35. br label %if0.exit
  36. if0.F:
  37. store i32 7, i32 *%res
  38. br label %if0.exit
  39. if0.exit:
  40. br label %loop0.latch
  41. loop0.latch:
  42. br label %loop0
  43. }