1 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs | FileCheck %s
3 ; Test that foldMemoryOperandImpl() doesn't drop subreg / read-undef flags.
6 define void @fun_llvm_stress_reduced(ptr, ptr, ptr, i64, i8) {
11 %E6 = extractelement <4 x i1> undef, i32 3
12 %L23 = load i8, ptr %0
13 %B27 = fmul double 0x59A989483BA7E0C6, undef
14 %L30 = load i16, ptr undef
15 store i16 -11933, ptr undef
16 %L46 = load i16, ptr undef
17 %L61 = load i16, ptr undef
18 %Sl74 = select i1 undef, i1 undef, i1 true
21 CF846: ; preds = %CF877, %BB
22 %I86 = insertelement <4 x i1> undef, i1 undef, i32 0
23 %Cmp89 = icmp ne i64 undef, %3
24 %L90 = load i16, ptr undef
25 %Shuff92 = shufflevector <4 x i16> zeroinitializer, <4 x i16> zeroinitializer, <4 x i32> <i32 0, i32 2, i32 undef, i32 6>
28 CF877: ; preds = %CF846
29 store i16 %L61, ptr undef
30 %Cmp110 = icmp eq i16 %L61, undef
31 br i1 %Cmp110, label %CF846, label %CF862
33 CF862: ; preds = %CF877
34 %I114 = insertelement <4 x i64> zeroinitializer, i64 0, i32 0
35 %B115 = shl <4 x i64> zeroinitializer, %I114
36 %Sl124 = select i1 true, ptr %A1, ptr %A1
37 %B130 = frem double %B27, 0x59A989483BA7E0C6
38 %E143 = extractelement <4 x i64> %B115, i32 1
39 %Sl148 = select i1 %Cmp89, <1 x i32> undef, <1 x i32> zeroinitializer
42 CF855: ; preds = %CF855, %CF862
43 %Sl171 = select i1 %Sl74, i1 %E6, i1 undef
44 br i1 %Sl171, label %CF855, label %CF874
46 CF874: ; preds = %CF855
47 %L196 = load i16, ptr undef
48 %B207 = or i8 %4, %L23
49 %L211 = load <8 x i1>, ptr %Sl124
50 %B215 = fdiv double 0x8421A9C0D21F6D3E, %B130
51 %L218 = load i16, ptr %1
52 %Sl223 = select i1 %Sl171, <4 x i1> %I86, <4 x i1> undef
55 CF826: ; preds = %CF866, %CF910, %CF874
56 %B245 = ashr i16 -11933, %L46
59 CF910: ; preds = %CF826
60 %L257 = load i8, ptr %0
61 %BC262 = bitcast i64 %E143 to double
62 store i16 %L196, ptr %1
63 %E266 = extractelement <4 x i16> %Shuff92, i32 0
64 %Sl271 = select i1 %Cmp89, i1 %Cmp89, i1 %Cmp110
65 br i1 %Sl271, label %CF826, label %CF866
67 CF866: ; preds = %CF910
68 store i64 %E143, ptr %2
69 %I276 = insertelement <4 x double> undef, double %BC262, i32 3
70 %L281 = load <8 x i1>, ptr %Sl124
71 %E282 = extractelement <4 x i1> zeroinitializer, i32 2
72 br i1 %E282, label %CF826, label %CF848
74 CF848: ; preds = %CF866
75 %Cmp288 = fcmp olt <4 x double> undef, %I276
76 %FC294 = fptosi double undef to i16
77 %Cmp296 = icmp ule i16 %FC294, %B245
78 store i16 %L218, ptr undef
80 %E320 = extractelement <4 x i1> %Sl223, i32 1
81 %Cmp345 = icmp uge <1 x i32> undef, %Sl148
82 store i16 %L196, ptr %1
85 CF893: ; preds = %CF893, %CF848
86 %Cmp361 = fcmp uge float undef, undef
87 br i1 %Cmp361, label %CF893, label %CF906
89 CF906: ; preds = %CF893
90 store i16 -11933, ptr undef
91 %Shuff379 = shufflevector <1 x i1> undef, <1 x i1> %Cmp345, <1 x i32> <i32 1>
94 CF850: ; preds = %CF850, %CF906
95 br i1 undef, label %CF850, label %CF925
97 CF925: ; preds = %CF850
98 store i16 %E266, ptr %1
99 %Cmp413 = icmp ugt i8 %L257, undef
100 store i16 %L30, ptr %1
101 %Sl420 = select i1 %Sl171, <8 x i1> undef, <8 x i1> %L281
102 store i16 %L90, ptr undef
103 %FC469 = uitofp i1 %Cmp296 to float
104 store i1 %Cmp413, ptr %Sl124
107 CF833: ; preds = %CF833, %CF925
108 store i8 %B207, ptr %0
109 %E509 = extractelement <8 x i1> %L211, i32 7
110 br i1 %E509, label %CF833, label %CF882
112 CF882: ; preds = %CF833
113 store i1 %Sl271, ptr %Sl124
116 CF852: ; preds = %CF896, %CF882
117 store i1 %Sl74, ptr %Sl124
120 CF896: ; preds = %CF852
121 %E576 = extractelement <4 x i1> %Cmp288, i32 3
122 br i1 %E576, label %CF852, label %CF890
124 CF890: ; preds = %CF896
125 %Sl581 = select i1 undef, float undef, float %FC469