1; RUN: opt -simple-loop-unswitch -disable-output < %s 2; RUN: opt -simple-loop-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa -disable-output < %s 3; PR10031 4 5define i32 @test(i32 %command) { 6entry: 7 br label %tailrecurse 8 9tailrecurse: ; preds = %if.then14, %tailrecurse, %entry 10 br i1 undef, label %if.then, label %tailrecurse 11 12if.then: ; preds = %tailrecurse 13 switch i32 %command, label %sw.bb [ 14 i32 2, label %land.lhs.true 15 i32 0, label %land.lhs.true 16 ] 17 18land.lhs.true: ; preds = %if.then, %if.then 19 br i1 undef, label %sw.bb, label %if.then14 20 21if.then14: ; preds = %land.lhs.true 22 switch i32 %command, label %tailrecurse [ 23 i32 0, label %sw.bb 24 i32 1, label %sw.bb 25 ] 26 27sw.bb: ; preds = %if.then14 28 unreachable 29} 30