You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
; CHECK-NEXT: [[SEL:%.*]] = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr [[LOC:%.*]], i32 1, <vscale x 4 x i1> [[MASK:%.*]], <vscale x 4 x float> [[PASSTHROUGH:%.*]])
121
+
; CHECK-NEXT: ret <vscale x 4 x float> [[SEL]]
122
+
;
123
+
%load = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr%loc, i321, <vscale x 4 x i1> %mask, <vscale x 4 x float> zeroinitializer)
124
+
%sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %load, <vscale x 4 x float> %passthrough
125
+
ret <vscale x 4 x float> %sel
126
+
}
127
+
128
+
define <vscale x 4 x float> @neg_fold_sel_into_masked_load_mask_mismatch(ptr%loc, <vscale x 4 x i1> %mask, <vscale x 4 x i1> %mask2, <vscale x 4 x float> %passthrough) {
; CHECK-NEXT: [[LOAD:%.*]] = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr [[LOC:%.*]], i32 1, <vscale x 4 x i1> [[MASK:%.*]], <vscale x 4 x float> [[PASSTHROUGH:%.*]])
131
+
; CHECK-NEXT: [[SEL:%.*]] = select <vscale x 4 x i1> [[MASK2:%.*]], <vscale x 4 x float> [[LOAD]], <vscale x 4 x float> [[PASSTHROUGH]]
132
+
; CHECK-NEXT: ret <vscale x 4 x float> [[SEL]]
133
+
;
134
+
%load = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr%loc, i321, <vscale x 4 x i1> %mask, <vscale x 4 x float> %passthrough)
135
+
%sel = select <vscale x 4 x i1> %mask2, <vscale x 4 x float> %load, <vscale x 4 x float> %passthrough
136
+
ret <vscale x 4 x float> %sel
137
+
}
138
+
139
+
define <vscale x 4 x float> @fold_sel_into_masked_load_scalable_one_use_check(ptr%loc1, <vscale x 4 x i1> %mask, <vscale x 4 x float> %passthrough, ptr%loc2) {
; CHECK-NEXT: [[LOAD:%.*]] = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr [[LOC:%.*]], i32 1, <vscale x 4 x i1> [[MASK:%.*]], <vscale x 4 x float> zeroinitializer)
142
+
; CHECK-NEXT: [[SEL:%.*]] = select <vscale x 4 x i1> [[MASK]], <vscale x 4 x float> [[LOAD]], <vscale x 4 x float> [[PASSTHROUGH:%.*]]
143
+
; CHECK-NEXT: call void @llvm.masked.store.nxv4f32.p0(<vscale x 4 x float> [[LOAD]], ptr [[LOC2:%.*]], i32 1, <vscale x 4 x i1> [[MASK]])
144
+
; CHECK-NEXT: ret <vscale x 4 x float> [[SEL]]
145
+
;
146
+
%load = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr%loc1, i321, <vscale x 4 x i1> %mask, <vscale x 4 x float> zeroinitializer)
147
+
%sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %load, <vscale x 4 x float> %passthrough
148
+
callvoid@llvm.masked.store.nxv4f32.p0(<vscale x 4 x float> %load, ptr%loc2, i321, <vscale x 4 x i1> %mask)
149
+
ret <vscale x 4 x float> %sel
150
+
}
151
+
119
152
declare <8 x float> @llvm.masked.load.v8f32.p0(ptr, i32 immarg, <8 x i1>, <8 x float>)
120
153
declare <4 x i32> @llvm.masked.load.v4i32.p0(ptr, i32 immarg, <4 x i1>, <4 x i32>)
121
154
declare <4 x float> @llvm.masked.load.v4f32.p0(ptr, i32 immarg, <4 x i1>, <4 x float>)
0 commit comments