1; RUN: llc < %s | FileCheck %s 2target datalayout = "e-m:e-i64:64-n32:64" 3target triple = "powerpc64le-unknown-linux-gnu" 4 5@c = external global i32, align 4 6@b = external global [1 x i32], align 4 7 8; Function Attrs: nounwind 9define void @fn2() #0 align 4 { 10 br i1 undef, label %.lr.ph, label %4 11 12; We used to crash because a bad DAGCombine was creating i32-typed SETCC nodes, 13; even when crbits are enabled. 14; CHECK-LABEL: @fn2 15; CHECK: blr 16 17.lr.ph: ; preds = %0 18 br i1 undef, label %.lr.ph.split, label %.preheader 19 20.preheader: ; preds = %.preheader, %.lr.ph 21 br i1 undef, label %.lr.ph.split, label %.preheader 22 23.lr.ph.split: ; preds = %.preheader, %.lr.ph 24 br i1 undef, label %._crit_edge, label %.lr.ph.split.split 25 26.lr.ph.split.split: ; preds = %.lr.ph.split.split, %.lr.ph.split 27 %1 = phi i32 [ %2, %.lr.ph.split.split ], [ undef, %.lr.ph.split ] 28 %2 = and i32 %1, and (i32 and (i32 and (i32 and (i32 and (i32 and (i32 and (i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)), i32 zext (i1 select (i1 icmp eq ([1 x i32]* bitcast (i32* @c to [1 x i32]*), [1 x i32]* @b), i1 true, i1 false) to i32)) 29 %3 = icmp slt i32 undef, 4 30 br i1 %3, label %.lr.ph.split.split, label %._crit_edge 31 32._crit_edge: ; preds = %.lr.ph.split.split, %.lr.ph.split 33 %.lcssa = phi i32 [ undef, %.lr.ph.split ], [ %2, %.lr.ph.split.split ] 34 br label %4 35 36; <label>:4 ; preds = %._crit_edge, %0 37 ret void 38} 39 40attributes #0 = { nounwind "target-cpu"="ppc64le" } 41 42