1 ; RUN: opt -disable-output -licm -enable-new-pm=0 -print-memoryssa < %s 2>&1 | FileCheck %s
2 ; RUN: opt -disable-output -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
3 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
4 target triple = "s390x-ibm-linux"
6 @g_248 = external dso_local local_unnamed_addr global i32, align 4
7 @g_976 = external dso_local global i64, align 8
8 @g_1087 = external dso_local global i32**, align 8
11 ; CHECK: 5 = MemoryPhi(
12 ; CHECK-NOT: 7 = MemoryPhi(
13 define dso_local fastcc void @f1() unnamed_addr #0 {
15 br i1 undef, label %thread-pre-split.i.preheader, label %label5
17 thread-pre-split.i.preheader: ; preds = %label0
18 br label %thread-pre-split.i
20 thread-pre-split.i.us: ; preds = %.critedge1.i.us
21 br i1 undef, label %.preheader.i.us.preheader, label %label2
23 .preheader.i.us.preheader: ; preds = %thread-pre-split.i.us
24 br label %.preheader.i.us
26 .preheader.i.us: ; preds = %._crit_edge.i.us, %.preheader.i.us.preheader
27 br i1 undef, label %.lr.ph.i.us, label %._crit_edge.i.us
29 .lr.ph.i.us: ; preds = %.preheader.i.us
32 label1: ; preds = %label1, %.lr.ph.i.us
33 br i1 undef, label %label1, label %._crit_edge.i.us
35 ._crit_edge.i.us: ; preds = %label1, %.preheader.i.us
36 br i1 undef, label %.preheader.i.us, label %._crit_edge5.i.us
38 ._crit_edge5.i.us: ; preds = %._crit_edge.i.us
41 label2: ; preds = %._crit_edge5.i.us, %thread-pre-split.i.us
42 tail call void @foo16()
43 br i1 undef, label %.lr.ph8.i.us.preheader, label %label4
45 .lr.ph8.i.us.preheader: ; preds = %label2
46 br label %.lr.ph8.i.us
48 .lr.ph8.i.us: ; preds = %.lr.ph8.i.us, %.lr.ph8.i.us.preheader
49 %tmp3 = load volatile i64, i64* @g_976, align 8
50 br i1 undef, label %.lr.ph8.i.us, label %._crit_edge9.i.us
52 ._crit_edge9.i.us: ; preds = %.lr.ph8.i.us
55 label4: ; preds = %._crit_edge9.i.us, %label2
56 br i1 true, label %f9.exit, label %.critedge1.i.us
58 .critedge1.i.us: ; preds = %label4
59 br i1 undef, label %thread-pre-split.i.us, label %f9.exit
61 label5: ; preds = %label0
64 thread-pre-split.i: ; preds = %.critedge1.i, %thread-pre-split.i.preheader
65 br i1 undef, label %.preheader.i.preheader, label %.critedge1.i
67 .preheader.i.preheader: ; preds = %thread-pre-split.i
68 br label %.preheader.i
70 .preheader.i: ; preds = %._crit_edge.i, %.preheader.i.preheader
71 br i1 undef, label %.lr.ph.i, label %._crit_edge.i
73 .lr.ph.i: ; preds = %.preheader.i
76 label6: ; preds = %label6, %.lr.ph.i
77 br i1 undef, label %label6, label %._crit_edge.i.loopexit
79 ._crit_edge.i.loopexit: ; preds = %label6
80 br label %._crit_edge.i
82 ._crit_edge.i: ; preds = %._crit_edge.i.loopexit, %.preheader.i
83 br i1 undef, label %.preheader.i, label %._crit_edge5.i
85 ._crit_edge5.i: ; preds = %._crit_edge.i
86 br label %.critedge1.i
88 .critedge1.i: ; preds = %._crit_edge5.i, %thread-pre-split.i
89 %tmp7 = load i32, i32* @g_248, align 4
90 %tmp8 = xor i32 %tmp7, 55987
91 store i32 %tmp8, i32* @g_248, align 4
92 br i1 undef, label %thread-pre-split.i, label %f9.exit.loopexit
94 f9.exit.loopexit: ; preds = %.critedge1.i
97 f9.exit: ; preds = %f9.exit.loopexit, %.critedge1.i.us, %label4
98 %tmp9 = load volatile i32**, i32*** @g_1087, align 8
102 declare dso_local void @foo16() local_unnamed_addr #1
104 attributes #0 = { "target-features"="+transactional-execution,+vector" }
105 attributes #1 = { "use-soft-float"="false" }