52 lines · plain
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s2target datalayout = "e-m:e-i64:64-n32:64"3target triple = "powerpc64le-unknown-linux-gnu"4 5@c = external unnamed_addr global i32, align 46@b = external global [1 x i32], align 47 8; Function Attrs: nounwind9define void @fn2() #0 align 4 {10 br i1 undef, label %.lr.ph, label %411 12; We used to crash because a bad DAGCombine was creating i32-typed SETCC nodes,13; even when crbits are enabled.14; CHECK-LABEL: @fn215; CHECK: blr16 17.lr.ph: ; preds = %018 br i1 undef, label %.lr.ph.split, label %.preheader19 20.preheader: ; preds = %.preheader, %.lr.ph21 br i1 undef, label %.lr.ph.split, label %.preheader22 23.lr.ph.split: ; preds = %.preheader, %.lr.ph24 br i1 undef, label %._crit_edge, label %.lr.ph.split.split25 26.lr.ph.split.split: ; preds = %.lr.ph.split.split, %.lr.ph.split27 %1 = phi i32 [ %2, %.lr.ph.split.split ], [ undef, %.lr.ph.split ]28 %cmp = icmp eq ptr @c, @b29 %constexpr = select i1 %cmp, i1 true, i1 false30 %constexpr1 = zext i1 %constexpr to i3231 %constexpr2 = and i32 %constexpr1, %constexpr132 %constexpr3 = and i32 %constexpr2, %constexpr133 %constexpr4 = and i32 %constexpr3, %constexpr134 %constexpr5 = and i32 %constexpr4, %constexpr135 %constexpr6 = and i32 %constexpr5, %constexpr136 %constexpr7 = and i32 %constexpr6, %constexpr137 %constexpr8 = and i32 %constexpr7, %constexpr138 %2 = and i32 %1, %constexpr839 %3 = icmp slt i32 undef, 440 br i1 %3, label %.lr.ph.split.split, label %._crit_edge41 42._crit_edge: ; preds = %.lr.ph.split.split, %.lr.ph.split43 %.lcssa = phi i32 [ undef, %.lr.ph.split ], [ %2, %.lr.ph.split.split ]44 br label %445 464: ; preds = %._crit_edge, %047 ret void48}49 50attributes #0 = { nounwind "target-cpu"="ppc64le" }51 52