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 {
11 br i1 undef, label %1, label %10
14 br i1 undef, label %3, label %2
17 br i1 undef, label %3, label %2
20 br i1 undef, label %8, label %4
23 %5 = phi i64 [ %6, %4 ], [ undef, %3 ]
24 %constexpr = getelementptr inbounds [2 x i32], ptr @d, i64 0, i64 1
25 %constexpr1 = icmp eq ptr %constexpr, @c
26 %constexpr2 = zext i1 %constexpr1 to i32
27 %constexpr3 = getelementptr inbounds [2 x i32], ptr @d, i64 0, i64 1
28 %constexpr4 = icmp eq ptr %constexpr3, @c
29 %constexpr5 = zext i1 %constexpr4 to i32
30 %constexpr6 = lshr i32 %constexpr5, 6
31 %constexpr7 = getelementptr inbounds [2 x i32], ptr @d, i64 0, i64 1
32 %constexpr8 = icmp eq ptr %constexpr7, @c
33 %constexpr9 = zext i1 %constexpr8 to i16
34 %constexpr10 = icmp slt i16 %constexpr9, 0
35 %constexpr11 = select i1 %constexpr10, i32 %constexpr2, i32 %constexpr6
36 %constexpr112 = sext i32 %constexpr11 to i64
37 %constexpr213 = and i64 %constexpr112, %constexpr112
38 %constexpr314 = and i64 %constexpr213, %constexpr112
39 %constexpr415 = and i64 %constexpr314, %constexpr112
40 %constexpr516 = and i64 %constexpr415, %constexpr112
41 %constexpr617 = and i64 %constexpr516, %constexpr112
42 %constexpr718 = and i64 %constexpr617, %constexpr112
43 %constexpr819 = and i64 %constexpr718, %constexpr112
44 %6 = and i64 %5, %constexpr819
45 %7 = icmp slt i32 undef, 6
46 br i1 %7, label %4, label %8
49 %9 = phi i64 [ undef, %3 ], [ %6, %4 ]
56 attributes #0 = { norecurse nounwind "target-cpu"="ppc64le" }