@@ -227,12 +227,13 @@ bb:
227227 ret void
228228}
229229
230- ; This should promote
230+ ; This should not promote
231231define internal fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256 (ptr %arg , ptr readonly %arg1 ) #3 {
232232; CHECK-LABEL: define {{[^@]+}}@callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256
233- ; CHECK-SAME: (ptr [[ARG:%.*]], <8 x i64> [[ARG1_0_VAL :%.*]]) #[[ATTR3:[0-9]+]] {
233+ ; CHECK-SAME: (ptr [[ARG:%.*]], ptr readonly [[ARG1 :%.*]]) #[[ATTR3:[0-9]+]] {
234234; CHECK-NEXT: bb:
235- ; CHECK-NEXT: store <8 x i64> [[ARG1_0_VAL]], ptr [[ARG]], align 64
235+ ; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, ptr [[ARG1]], align 64
236+ ; CHECK-NEXT: store <8 x i64> [[TMP]], ptr [[ARG]], align 64
236237; CHECK-NEXT: ret void
237238;
238239bb:
@@ -243,13 +244,12 @@ bb:
243244
244245define void @avx2_legal256_prefer256_call_avx2_legal512_prefer256 (ptr %arg ) #4 {
245246; CHECK-LABEL: define {{[^@]+}}@avx2_legal256_prefer256_call_avx2_legal512_prefer256
246- ; CHECK-SAME: (ptr [[ARG:%.*]]) #[[ATTR3 ]] {
247+ ; CHECK-SAME: (ptr [[ARG:%.*]]) #[[ATTR4:[0-9]+ ]] {
247248; CHECK-NEXT: bb:
248249; CHECK-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
249250; CHECK-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
250251; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 32 [[TMP]], i8 0, i64 32, i1 false)
251- ; CHECK-NEXT: [[TMP_VAL:%.*]] = load <8 x i64>, ptr [[TMP]], align 64
252- ; CHECK-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(ptr [[TMP2]], <8 x i64> [[TMP_VAL]])
252+ ; CHECK-NEXT: call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(ptr [[TMP2]], ptr [[TMP]])
253253; CHECK-NEXT: [[TMP4:%.*]] = load <8 x i64>, ptr [[TMP2]], align 32
254254; CHECK-NEXT: store <8 x i64> [[TMP4]], ptr [[ARG]], align 2
255255; CHECK-NEXT: ret void
@@ -264,12 +264,13 @@ bb:
264264 ret void
265265}
266266
267- ; This should promote
267+ ; This should not promote
268268define internal fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256 (ptr %arg , ptr readonly %arg1 ) #4 {
269269; CHECK-LABEL: define {{[^@]+}}@callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256
270- ; CHECK-SAME: (ptr [[ARG:%.*]], <8 x i64> [[ARG1_0_VAL :%.*]]) #[[ATTR3 ]] {
270+ ; CHECK-SAME: (ptr [[ARG:%.*]], ptr readonly [[ARG1 :%.*]]) #[[ATTR4 ]] {
271271; CHECK-NEXT: bb:
272- ; CHECK-NEXT: store <8 x i64> [[ARG1_0_VAL]], ptr [[ARG]], align 64
272+ ; CHECK-NEXT: [[TMP:%.*]] = load <8 x i64>, ptr [[ARG1]], align 64
273+ ; CHECK-NEXT: store <8 x i64> [[TMP]], ptr [[ARG]], align 64
273274; CHECK-NEXT: ret void
274275;
275276bb:
@@ -285,8 +286,7 @@ define void @avx2_legal512_prefer256_call_avx2_legal256_prefer256(ptr %arg) #3 {
285286; CHECK-NEXT: [[TMP:%.*]] = alloca <8 x i64>, align 32
286287; CHECK-NEXT: [[TMP2:%.*]] = alloca <8 x i64>, align 32
287288; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 32 [[TMP]], i8 0, i64 32, i1 false)
288- ; CHECK-NEXT: [[TMP_VAL:%.*]] = load <8 x i64>, ptr [[TMP]], align 64
289- ; CHECK-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(ptr [[TMP2]], <8 x i64> [[TMP_VAL]])
289+ ; CHECK-NEXT: call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(ptr [[TMP2]], ptr [[TMP]])
290290; CHECK-NEXT: [[TMP4:%.*]] = load <8 x i64>, ptr [[TMP2]], align 32
291291; CHECK-NEXT: store <8 x i64> [[TMP4]], ptr [[ARG]], align 2
292292; CHECK-NEXT: ret void
0 commit comments