1; RUN: opt -S -passes=spec-phis %s 2 3; This testcase crashes during the speculate around PHIs pass. The pass however 4; results in no changes. 5 6define i32 @test1() { 7entry: 8 callbr void asm sideeffect "", "X,X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@test1, %return), i8* blockaddress(@test1, %f)) 9 to label %asm.fallthrough [label %return, label %f] 10 11asm.fallthrough: 12 br label %return 13 14f: 15 br label %return 16 17return: 18 %retval.0 = phi i32 [ 0, %f ], [ 1, %asm.fallthrough ], [ 1, %entry ] 19 ret i32 %retval.0 20} 21 22define void @test2() { 23entry: 24 br label %tailrecurse 25 26tailrecurse: 27 %call = tail call i32 @test3() 28 %tobool1 = icmp eq i32 %call, 0 29 callbr void asm sideeffect "", "X,X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@test2, %test1.exit), i8* blockaddress(@test2, %f.i)) 30 to label %if.end6 [label %test1.exit, label %f.i] 31 32f.i: 33 br label %test1.exit 34 35test1.exit: 36 %retval.0.i = phi i1 [ false, %f.i ], [ true, %tailrecurse ] 37 %brmerge = or i1 %tobool1, %retval.0.i 38 br i1 %brmerge, label %if.end6, label %tailrecurse 39 40if.end6: 41 ret void 42} 43 44declare i32 @test3() 45