Home | History | Annotate | Download | only in SimplifyCFG
      1 ; This test checks to make sure that 'br X, Dest, Dest' is folded into 
      2 ; 'br Dest'
      3 
      4 ; RUN: opt < %s -simplifycfg -S | FileCheck %s
      5 
      6 declare void @noop()
      7 
      8 ; CHECK-NOT: br i1 %c2
      9 define i32 @test(i1 %c1, i1 %c2) {
     10 	call void @noop( )
     11 	br i1 %c1, label %A, label %Y
     12 A:		; preds = %0
     13 	call void @noop( )
     14 	br i1 %c2, label %X, label %X
     15 X:		; preds = %Y, %A, %A
     16 	call void @noop( )
     17 	ret i32 0
     18 Y:		; preds = %0
     19 	call void @noop( )
     20 	br label %X
     21 }
     22 
     23