flattencfg.ll 710 B

1234567891011121314151617181920212223242526
  1. ; RUN: opt -flattencfg -S < %s | FileCheck %s
  2. ; This test checks whether the pass completes without a crash.
  3. ; The code is not transformed in any way
  4. ;
  5. ; CHECK-LABEL: @test_not_crash
  6. define void @test_not_crash(i32 %in_a) #0 {
  7. entry:
  8. %cmp0 = icmp eq i32 %in_a, -1
  9. %cmp1 = icmp ne i32 %in_a, 0
  10. %cond0 = and i1 %cmp0, %cmp1
  11. br i1 %cond0, label %b0, label %b1
  12. b0: ; preds = %entry
  13. %cmp2 = icmp eq i32 %in_a, 0
  14. %cmp3 = icmp ne i32 %in_a, 1
  15. %cond1 = or i1 %cmp2, %cmp3
  16. br i1 %cond1, label %exit, label %b1
  17. b1: ; preds = %entry, %b0
  18. br label %exit
  19. exit: ; preds = %entry, %b0, %b1
  20. ret void
  21. }