1 ; RUN: opt < %s -instcombine -S | FileCheck %s 2 3 ; CHECK: no_crash 4 define float @no_crash(float %a) nounwind { 5 entry: 6 br label %for.body 7 8 for.body: 9 %sum.057 = phi float [ 0.000000e+00, %entry ], [ %add5, %bb0 ] 10 %add5 = fadd float %sum.057, %a ; PR14592 11 br i1 undef, label %bb0, label %end 12 13 bb0: 14 br label %for.body 15 16 end: 17 ret float %add5 18 } 19 20 ; CHECK-LABEL: @pr21377( 21 define void @pr21377(i32) { 22 entry: 23 br label %while.body 24 25 while.body: ; preds = %if.end, %entry 26 %phi1 = phi i64 [ undef, %entry ], [ %or2, %if.end ] 27 %zext = zext i32 %0 to i64 28 br i1 undef, label %if.end, label %if.else 29 30 if.else: ; preds = %while.body 31 %or1 = or i64 %phi1, %zext 32 %and = and i64 %or1, 4294967295 33 br label %if.end 34 35 if.end: ; preds = %if.else, %while.body 36 %phi2 = phi i64 [ %and, %if.else ], [ undef, %while.body ] 37 %or2 = or i64 %phi2, %zext 38 br label %while.body 39 } 40