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(i8*, i32*, i64*, i64, i8) {
11 %E6 = extractelement <4 x i1> undef, i32 3
12 %L23 = load i8, i8* %0
13 %B27 = fmul double 0x59A989483BA7E0C6, undef
14 %L30 = load i16, i16* undef
15 store i16 -11933, i16* undef
16 %L46 = load i16, i16* undef
17 %L61 = load i16, i16* 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, i16* 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, i16* 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, <8 x i1>* %A1, <8 x i1>* %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 %PC186 = bitcast i32* %1 to i16*
48 %L196 = load i16, i16* undef
49 %B207 = or i8 %4, %L23
50 %L211 = load <8 x i1>, <8 x i1>* %Sl124
51 %B215 = fdiv double 0x8421A9C0D21F6D3E, %B130
52 %L218 = load i16, i16* %PC186
53 %Sl223 = select i1 %Sl171, <4 x i1> %I86, <4 x i1> undef
56 CF826: ; preds = %CF866, %CF910, %CF874
57 %B245 = ashr i16 -11933, %L46
60 CF910: ; preds = %CF826
61 %L257 = load i8, i8* %0
62 %BC262 = bitcast i64 %E143 to double
63 store i16 %L196, i16* %PC186
64 %E266 = extractelement <4 x i16> %Shuff92, i32 0
65 %Sl271 = select i1 %Cmp89, i1 %Cmp89, i1 %Cmp110
66 br i1 %Sl271, label %CF826, label %CF866
68 CF866: ; preds = %CF910
69 store i64 %E143, i64* %2
70 %I276 = insertelement <4 x double> undef, double %BC262, i32 3
71 %L281 = load <8 x i1>, <8 x i1>* %Sl124
72 %E282 = extractelement <4 x i1> zeroinitializer, i32 2
73 br i1 %E282, label %CF826, label %CF848
75 CF848: ; preds = %CF866
76 %Cmp288 = fcmp olt <4 x double> undef, %I276
77 %FC294 = fptosi double undef to i16
78 %Cmp296 = icmp ule i16 %FC294, %B245
79 store i16 %L218, i16* undef
81 %E320 = extractelement <4 x i1> %Sl223, i32 1
82 %PC337 = bitcast <8 x i1>* %Sl124 to i1*
83 %Cmp345 = icmp uge <1 x i32> undef, %Sl148
84 store i16 %L196, i16* %PC186
87 CF893: ; preds = %CF893, %CF848
88 %Cmp361 = fcmp uge float undef, undef
89 br i1 %Cmp361, label %CF893, label %CF906
91 CF906: ; preds = %CF893
92 store i16 -11933, i16* undef
93 %Shuff379 = shufflevector <1 x i1> undef, <1 x i1> %Cmp345, <1 x i32> <i32 1>
96 CF850: ; preds = %CF850, %CF906
97 br i1 undef, label %CF850, label %CF925
99 CF925: ; preds = %CF850
100 store i16 %E266, i16* %PC186
101 %Cmp413 = icmp ugt i8 %L257, undef
102 store i16 %L30, i16* %PC186
103 %Sl420 = select i1 %Sl171, <8 x i1> undef, <8 x i1> %L281
104 store i16 %L90, i16* undef
105 %FC469 = uitofp i1 %Cmp296 to float
106 store i1 %Cmp413, i1* %PC337
109 CF833: ; preds = %CF833, %CF925
110 store i8 %B207, i8* %0
111 %E509 = extractelement <8 x i1> %L211, i32 7
112 br i1 %E509, label %CF833, label %CF882
114 CF882: ; preds = %CF833
115 store i1 %Sl271, i1* %PC337
118 CF852: ; preds = %CF896, %CF882
119 store i1 %Sl74, i1* %PC337
122 CF896: ; preds = %CF852
123 %E576 = extractelement <4 x i1> %Cmp288, i32 3
124 br i1 %E576, label %CF852, label %CF890
126 CF890: ; preds = %CF896
127 %Sl581 = select i1 undef, float undef, float %FC469