1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 target datalayout = "e-m:e-i64:64-n32:64"
3 target triple = "powerpc64le-unknown-linux-gnu"
5 @c = external unnamed_addr global i32, align 4
6 @b = external global [1 x i32], align 4
8 ; Function Attrs: nounwind
9 define void @fn2() #0 align 4 {
10 br i1 undef, label %.lr.ph, label %4
12 ; We used to crash because a bad DAGCombine was creating i32-typed SETCC nodes,
13 ; even when crbits are enabled.
18 br i1 undef, label %.lr.ph.split, label %.preheader
20 .preheader: ; preds = %.preheader, %.lr.ph
21 br i1 undef, label %.lr.ph.split, label %.preheader
23 .lr.ph.split: ; preds = %.preheader, %.lr.ph
24 br i1 undef, label %._crit_edge, label %.lr.ph.split.split
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 %constexpr = select i1 icmp eq (ptr @c, ptr @b), i1 true, i1 false
29 %constexpr1 = zext i1 %constexpr to i32
30 %constexpr2 = and i32 %constexpr1, %constexpr1
31 %constexpr3 = and i32 %constexpr2, %constexpr1
32 %constexpr4 = and i32 %constexpr3, %constexpr1
33 %constexpr5 = and i32 %constexpr4, %constexpr1
34 %constexpr6 = and i32 %constexpr5, %constexpr1
35 %constexpr7 = and i32 %constexpr6, %constexpr1
36 %constexpr8 = and i32 %constexpr7, %constexpr1
37 %2 = and i32 %1, %constexpr8
38 %3 = icmp slt i32 undef, 4
39 br i1 %3, label %.lr.ph.split.split, label %._crit_edge
41 ._crit_edge: ; preds = %.lr.ph.split.split, %.lr.ph.split
42 %.lcssa = phi i32 [ undef, %.lr.ph.split ], [ %2, %.lr.ph.split.split ]
45 4: ; preds = %._crit_edge, %0
49 attributes #0 = { nounwind "target-cpu"="ppc64le" }