24 lines · plain
1; Inlining used to break PHI nodes. This tests that they are correctly updated2; when a node is split around the call instruction. The verifier caught the error.3;4; RUN: opt < %s -passes='cgscc(inline)'5;6 7define i64 @test(i64 %X) {8 ret i64 %X9}10 11define i64 @fib(i64 %n) {12; <label>:013 %T = icmp ult i64 %n, 2 ; <i1> [#uses=1]14 br i1 %T, label %BaseCase, label %RecurseCase15 16RecurseCase: ; preds = %017 %result = call i64 @test( i64 %n ) ; <i64> [#uses=0]18 br label %BaseCase19 20BaseCase: ; preds = %RecurseCase, %021 %X = phi i64 [ 1, %0 ], [ 2, %RecurseCase ] ; <i64> [#uses=1]22 ret i64 %X23}24