1 ; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s
2 target datalayout = "e-m:e-i64:64-n32:64"
3 target triple = "powerpc64le-unknown-linux-gnu"
5 @c = external global i32, align 4
6 @d = external global [2 x i32], align 4
8 ; Function Attrs: norecurse nounwind
9 define void @fn2() #0 {
12 br i1 undef, label %1, label %10
15 br i1 undef, label %3, label %2
18 br i1 undef, label %3, label %2
21 br i1 undef, label %8, label %4
24 %5 = phi i64 [ %6, %4 ], [ undef, %3 ]
25 %constexpr = select i1 icmp slt (i16 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i16), i16 0), i32 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i32), i32 lshr (i32 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i32), i32 6)
26 %constexpr1 = sext i32 %constexpr to i64
27 %constexpr2 = and i64 %constexpr1, %constexpr1
28 %constexpr3 = and i64 %constexpr2, %constexpr1
29 %constexpr4 = and i64 %constexpr3, %constexpr1
30 %constexpr5 = and i64 %constexpr4, %constexpr1
31 %constexpr6 = and i64 %constexpr5, %constexpr1
32 %constexpr7 = and i64 %constexpr6, %constexpr1
33 %constexpr8 = and i64 %constexpr7, %constexpr1
34 %6 = and i64 %5, %constexpr8
35 %7 = icmp slt i32 undef, 6
36 br i1 %7, label %4, label %8
39 %9 = phi i64 [ undef, %3 ], [ %6, %4 ]
46 attributes #0 = { norecurse nounwind "target-cpu"="ppc64le" }