[llvm] DSE: lift limitation on sizes being non-scalable (PR #110670)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 05:57:38 PDT 2024
https://github.com/artagnon updated https://github.com/llvm/llvm-project/pull/110670
>From 870743f8899555b83c95fb736baa59363248f937 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Tue, 1 Oct 2024 11:58:47 +0100
Subject: [PATCH 1/2] DSE: pre-commit tests for scalable vectors
As AliasAnalysis now has support for scalable sizes, add tests to
DeadStoreElimination covering the scalable vectors case, in preparation
to extend it.
---
.../offsetted-overlapping-stores.ll | 125 +++++++++++++++++-
.../stores-of-existing-values.ll | 80 ++++++++++-
2 files changed, 201 insertions(+), 4 deletions(-)
diff --git a/llvm/test/Transforms/DeadStoreElimination/offsetted-overlapping-stores.ll b/llvm/test/Transforms/DeadStoreElimination/offsetted-overlapping-stores.ll
index fbab350008f4ee..1352a0a77d23b6 100644
--- a/llvm/test/Transforms/DeadStoreElimination/offsetted-overlapping-stores.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/offsetted-overlapping-stores.ll
@@ -47,6 +47,98 @@ bb:
ret void
}
+define void @ScalableVectorTestFullyOverlapping(ptr %arg, i32 %i) vscale_range(1, 2) {
+; CHECK-LABEL: @ScalableVectorTestFullyOverlapping(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[I7:%.*]] = add nuw nsw i32 [[I:%.*]], 1
+; CHECK-NEXT: [[I8:%.*]] = zext i32 [[I7]] to i64
+; CHECK-NEXT: [[I9:%.*]] = getelementptr inbounds float, ptr [[ARG:%.*]], i64 [[I8]]
+; CHECK-NEXT: store float 0.000000e+00, ptr [[I9]], align 4
+; CHECK-NEXT: [[I2:%.*]] = zext i32 [[I]] to i64
+; CHECK-NEXT: [[I3:%.*]] = getelementptr inbounds float, ptr [[ARG]], i64 [[I2]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I3]], align 8
+; CHECK-NEXT: ret void
+;
+bb:
+ %i7 = add nuw nsw i32 %i, 1
+ %i8 = zext i32 %i7 to i64
+ %i9 = getelementptr inbounds float, ptr %arg, i64 %i8
+ store float 0.0, ptr %i9
+ %i2 = zext i32 %i to i64
+ %i3 = getelementptr inbounds float, ptr %arg, i64 %i2
+ store <vscale x 2 x float> zeroinitializer, ptr %i3
+ ret void
+}
+
+define void @ScalableVectorTestFullyOverlapping2(ptr %arg, i32 %i) {
+; CHECK-LABEL: @ScalableVectorTestFullyOverlapping2(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[I7:%.*]] = add nuw nsw i32 [[I:%.*]], 1
+; CHECK-NEXT: [[I8:%.*]] = zext i32 [[I7]] to i64
+; CHECK-NEXT: [[I9:%.*]] = getelementptr inbounds float, ptr [[ARG:%.*]], i64 [[I8]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I9]], align 8
+; CHECK-NEXT: [[I2:%.*]] = zext i32 [[I]] to i64
+; CHECK-NEXT: [[I3:%.*]] = getelementptr inbounds float, ptr [[ARG]], i64 [[I2]]
+; CHECK-NEXT: store <vscale x 4 x float> zeroinitializer, ptr [[I3]], align 16
+; CHECK-NEXT: ret void
+;
+bb:
+ %i7 = add nuw nsw i32 %i, 1
+ %i8 = zext i32 %i7 to i64
+ %i9 = getelementptr inbounds float, ptr %arg, i64 %i8
+ store <vscale x 2 x float> zeroinitializer, ptr %i9
+ %i2 = zext i32 %i to i64
+ %i3 = getelementptr inbounds float, ptr %arg, i64 %i2
+ store <vscale x 4 x float> zeroinitializer, ptr %i3
+ ret void
+}
+
+define void @ScalableVectorTestNonOverlapping(ptr %arg, i32 %i) vscale_range(1, 2) {
+; CHECK-LABEL: @ScalableVectorTestNonOverlapping(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[I7:%.*]] = add nuw nsw i32 [[I:%.*]], 10
+; CHECK-NEXT: [[I8:%.*]] = zext i32 [[I7]] to i64
+; CHECK-NEXT: [[I9:%.*]] = getelementptr inbounds float, ptr [[ARG:%.*]], i64 [[I8]]
+; CHECK-NEXT: store float 0.000000e+00, ptr [[I9]], align 4
+; CHECK-NEXT: [[I2:%.*]] = zext i32 [[I]] to i64
+; CHECK-NEXT: [[I3:%.*]] = getelementptr inbounds float, ptr [[ARG]], i64 [[I2]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I3]], align 8
+; CHECK-NEXT: ret void
+;
+bb:
+ %i7 = add nuw nsw i32 %i, 10
+ %i8 = zext i32 %i7 to i64
+ %i9 = getelementptr inbounds float, ptr %arg, i64 %i8
+ store float 0.0, ptr %i9
+ %i2 = zext i32 %i to i64
+ %i3 = getelementptr inbounds float, ptr %arg, i64 %i2
+ store <vscale x 2 x float> zeroinitializer, ptr %i3
+ ret void
+}
+
+define void @ScalableVectorTestNonOverlapping2(ptr %arg, i32 %i) vscale_range(1, 2) {
+; CHECK-LABEL: @ScalableVectorTestNonOverlapping2(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[I7:%.*]] = add nuw nsw i32 [[I:%.*]], 10
+; CHECK-NEXT: [[I8:%.*]] = zext i32 [[I7]] to i64
+; CHECK-NEXT: [[I9:%.*]] = getelementptr inbounds float, ptr [[ARG:%.*]], i64 [[I8]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I9]], align 8
+; CHECK-NEXT: [[I2:%.*]] = zext i32 [[I]] to i64
+; CHECK-NEXT: [[I3:%.*]] = getelementptr inbounds float, ptr [[ARG]], i64 [[I2]]
+; CHECK-NEXT: store <vscale x 4 x float> zeroinitializer, ptr [[I3]], align 16
+; CHECK-NEXT: ret void
+;
+bb:
+ %i7 = add nuw nsw i32 %i, 10
+ %i8 = zext i32 %i7 to i64
+ %i9 = getelementptr inbounds float, ptr %arg, i64 %i8
+ store <vscale x 2 x float> zeroinitializer, ptr %i9
+ %i2 = zext i32 %i to i64
+ %i3 = getelementptr inbounds float, ptr %arg, i64 %i2
+ store <vscale x 4 x float> zeroinitializer, ptr %i3
+ ret void
+}
+
define void @ArrayTestPartiallyOverlapping(i64 %0) {
;
; The DSE pass will not kill the store because the overlap is partial
@@ -55,9 +147,9 @@ define void @ArrayTestPartiallyOverlapping(i64 %0) {
; CHECK-LABEL: @ArrayTestPartiallyOverlapping(
; CHECK-NEXT: [[TMP2:%.*]] = add i64 [[TMP0:%.*]], 10
; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [0 x i8], ptr @BUFFER, i64 0, i64 [[TMP2]]
-; CHECK-NEXT: [[TMP5:%.*]] = add i64 [[TMP0]], 15
-; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [0 x i8], ptr @BUFFER, i64 0, i64 [[TMP5]]
-; CHECK-NEXT: store i32 1, ptr [[TMP6]], align 4
+; CHECK-NEXT: [[TMP4:%.*]] = add i64 [[TMP0]], 15
+; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [0 x i8], ptr @BUFFER, i64 0, i64 [[TMP4]]
+; CHECK-NEXT: store i32 1, ptr [[TMP5]], align 4
; CHECK-NEXT: store i64 0, ptr [[TMP3]], align 4
; CHECK-NEXT: ret void
;
@@ -97,3 +189,30 @@ bb:
ret void
}
+define void @ScalableVectorTestPartiallyOverlapping(ptr %arg, i32 %i) {
+;
+; The DSE pass will not kill the store because the overlap is partial
+; and won't fully clobber the original store.
+;
+; CHECK-LABEL: @ScalableVectorTestPartiallyOverlapping(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: [[I2:%.*]] = zext i32 [[I:%.*]] to i64
+; CHECK-NEXT: [[I3:%.*]] = getelementptr inbounds float, ptr [[ARG:%.*]], i64 [[I2]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I3]], align 8
+; CHECK-NEXT: [[I5:%.*]] = add nuw nsw i32 [[I]], 1
+; CHECK-NEXT: [[I6:%.*]] = zext i32 [[I5]] to i64
+; CHECK-NEXT: [[I7:%.*]] = getelementptr inbounds float, ptr [[ARG]], i64 [[I6]]
+; CHECK-NEXT: store <vscale x 2 x float> zeroinitializer, ptr [[I7]], align 8
+; CHECK-NEXT: ret void
+;
+bb:
+ %i2 = zext i32 %i to i64
+ %i3 = getelementptr inbounds float, ptr %arg, i64 %i2
+ store <vscale x 2 x float> zeroinitializer, ptr %i3
+ %i5 = add nuw nsw i32 %i, 1
+ %i6 = zext i32 %i5 to i64
+ %i7 = getelementptr inbounds float, ptr %arg, i64 %i6
+ store <vscale x 2 x float> zeroinitializer, ptr %i7
+ ret void
+}
+
diff --git a/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll b/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
index c9a0943de8cd98..cc4a507c5ff61e 100644
--- a/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
@@ -641,7 +641,7 @@ define void @later_non_removable_store(i1 %c, ptr %p) {
; CHECK: if:
; CHECK-NEXT: br label [[EXIT]]
; CHECK: exit:
-; CHECK-NEXT: call void @use(ptr [[P]]) #[[ATTR6:[0-9]+]]
+; CHECK-NEXT: call void @use(ptr [[P]]) #[[ATTR7:[0-9]+]]
; CHECK-NEXT: ret void
;
store i8 1, ptr %p
@@ -655,3 +655,81 @@ exit:
call void @use(ptr %p) argmemonly
ret void
}
+
+define void @scalable_scalable_redundant_store(ptr %ptr) {
+; CHECK-LABEL: @scalable_scalable_redundant_store(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
+; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[GEP]], align 16
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 2
+ store <vscale x 2 x i64> zeroinitializer, ptr %gep
+ store <vscale x 4 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
+
+define void @scalable_scalable_neg(ptr %ptr) {
+; CHECK-LABEL: @scalable_scalable_neg(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 8
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[GEP]], align 32
+; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[PTR]], align 16
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 8
+ store <vscale x 4 x i64> zeroinitializer, ptr %gep
+ store <vscale x 2 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
+
+define void @scalable_fixed_redundant_store(ptr %ptr) vscale_range(1, 2) {
+; CHECK-LABEL: @scalable_fixed_redundant_store(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
+; CHECK-NEXT: store <2 x i64> zeroinitializer, ptr [[GEP]], align 16
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 2
+ store <2 x i64> zeroinitializer, ptr %gep
+ store <vscale x 4 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
+
+define void @scalable_fixed_neg(ptr %ptr) vscale_range(1, 2) {
+; CHECK-LABEL: @scalable_fixed_neg(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 16
+; CHECK-NEXT: store <2 x i64> zeroinitializer, ptr [[GEP]], align 16
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 16
+ store <2 x i64> zeroinitializer, ptr %gep
+ store <vscale x 4 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
+
+define void @fixed_scalable_redundant_store(ptr %ptr) vscale_range(1, 2) {
+; CHECK-LABEL: @fixed_scalable_redundant_store(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
+; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[GEP]], align 16
+; CHECK-NEXT: store <8 x i64> zeroinitializer, ptr [[PTR]], align 64
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 2
+ store <vscale x 2 x i64> zeroinitializer, ptr %gep
+ store <8 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
+
+define void @fixed_scalable_neg(ptr %ptr) vscale_range(1, 2) {
+; CHECK-LABEL: @fixed_scalable_neg(
+; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
+; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[GEP]], align 16
+; CHECK-NEXT: store <4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: ret void
+;
+ %gep = getelementptr i64, ptr %ptr, i64 2
+ store <vscale x 2 x i64> zeroinitializer, ptr %gep
+ store <4 x i64> zeroinitializer, ptr %ptr
+ ret void
+}
>From 7d27d233f33d8ae26ac82096ccf19601a189cb40 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Tue, 1 Oct 2024 14:16:20 +0100
Subject: [PATCH 2/2] DSE: lift limitation on sizes being non-scalable
As AliasAnalysis now has support for scalable sizes, lift the limitation
on analyzing scalable sizes in DeadStoreElimination.
---
.../Scalar/DeadStoreElimination.cpp | 70 +++++++++++++++----
.../stores-of-existing-values.ll | 12 +---
2 files changed, 60 insertions(+), 22 deletions(-)
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index ce8c988ba531dd..d0a4664c1789ec 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -266,6 +266,54 @@ static OverwriteResult isMaskedStoreOverwrite(const Instruction *KillingI,
return OW_Unknown;
}
+// Given a fixed/scalable LocationSize for DeadSize, we compute the
+// upper-range(DeadSize), by factoring in VScale.
+uint64_t getDeadSizeFactoringVScale(const LocationSize &DeadSz,
+ const Function &F) {
+ APInt DeadSize = APInt(64, DeadSz.getValue().getKnownMinValue());
+ ConstantRange CR = getVScaleRange(&F, 64);
+ if (DeadSz.isScalable()) {
+ bool Overflow;
+ APInt UpperRange = CR.getUnsignedMax().umul_ov(DeadSize, Overflow);
+ if (!Overflow)
+ DeadSize = UpperRange;
+ }
+ return DeadSize.getZExtValue();
+}
+
+// Given fixed/scalable LocationSizes for KillingSize and DeadSize, we compute
+// the lower-range(KillingSize) and upper-range(DeadSize), by factoring in
+// VScale.
+std::pair<uint64_t, uint64_t>
+getSizesFactoringVScale(const LocationSize &KillingSz,
+ const LocationSize &DeadSz, const Function &F) {
+ APInt KillingSize = APInt(64, KillingSz.getValue().getKnownMinValue());
+ APInt DeadSize = APInt(64, DeadSz.getValue().getKnownMinValue());
+
+ ConstantRange CR = getVScaleRange(&F, 64);
+ bool OverflowL, OverflowU;
+ if (KillingSz.isScalable() && DeadSz.isScalable()) {
+ // We have a special-case when both are scalable, so we ensure that we don't
+ // set one of the values, if UpperRange overflows but LowerRange doesn't, or
+ // vice-versa.
+ APInt LowerRange = CR.getUnsignedMin().umul_ov(KillingSize, OverflowL);
+ APInt UpperRange = CR.getUnsignedMax().umul_ov(DeadSize, OverflowU);
+ if (!OverflowL && !OverflowU) {
+ KillingSize = LowerRange;
+ DeadSize = UpperRange;
+ }
+ } else if (KillingSz.isScalable()) {
+ APInt LowerRange = CR.getUnsignedMin().umul_ov(KillingSize, OverflowL);
+ if (!OverflowL)
+ KillingSize = LowerRange;
+ } else if (DeadSz.isScalable()) {
+ APInt UpperRange = CR.getUnsignedMax().umul_ov(DeadSize, OverflowU);
+ if (!OverflowU)
+ DeadSize = UpperRange;
+ }
+ return {KillingSize.getZExtValue(), DeadSize.getZExtValue()};
+}
+
/// Return 'OW_Complete' if a store to the 'KillingLoc' location completely
/// overwrites a store to the 'DeadLoc' location, 'OW_End' if the end of the
/// 'DeadLoc' location is completely overwritten by 'KillingLoc', 'OW_Begin'
@@ -280,9 +328,11 @@ static OverwriteResult isPartialOverwrite(const MemoryLocation &KillingLoc,
const MemoryLocation &DeadLoc,
int64_t KillingOff, int64_t DeadOff,
Instruction *DeadI,
- InstOverlapIntervalsTy &IOL) {
- const uint64_t KillingSize = KillingLoc.Size.getValue();
- const uint64_t DeadSize = DeadLoc.Size.getValue();
+ InstOverlapIntervalsTy &IOL,
+ const Function &F) {
+ auto [KillingSize, DeadSize] =
+ getSizesFactoringVScale(KillingLoc.Size, DeadLoc.Size, F);
+
// We may now overlap, although the overlap is not complete. There might also
// be other incomplete overlaps, and together, they might cover the complete
// dead store.
@@ -1016,15 +1066,9 @@ struct DSEState {
return isMaskedStoreOverwrite(KillingI, DeadI, BatchAA);
}
- const TypeSize KillingSize = KillingLocSize.getValue();
- const TypeSize DeadSize = DeadLoc.Size.getValue();
- // Bail on doing Size comparison which depends on AA for now
- // TODO: Remove AnyScalable once Alias Analysis deal with scalable vectors
- const bool AnyScalable =
- DeadSize.isScalable() || KillingLocSize.isScalable();
+ auto [KillingSize, DeadSize] =
+ getSizesFactoringVScale(KillingLocSize, DeadLoc.Size, F);
- if (AnyScalable)
- return OW_Unknown;
// Query the alias information
AliasResult AAR = BatchAA.alias(KillingLoc, DeadLoc);
@@ -2101,7 +2145,7 @@ struct DSEState {
const Value *Ptr = Loc.Ptr->stripPointerCasts();
int64_t DeadStart = 0;
- uint64_t DeadSize = Loc.Size.getValue();
+ uint64_t DeadSize = getDeadSizeFactoringVScale(Loc.Size, F);
GetPointerBaseWithConstantOffset(Ptr, DeadStart, DL);
OverlapIntervalsTy &IntervalMap = OI.second;
Changed |= tryToShortenEnd(DeadI, IntervalMap, DeadStart, DeadSize);
@@ -2265,7 +2309,7 @@ DSEState::eliminateDeadDefs(const MemoryLocationWrapper &KillingLocWrapper) {
auto &IOL = Iter.first->second;
OR = isPartialOverwrite(KillingLocWrapper.MemLoc, DeadLocWrapper.MemLoc,
KillingOffset, DeadOffset,
- DeadLocWrapper.DefInst, IOL);
+ DeadLocWrapper.DefInst, IOL, F);
}
if (EnablePartialStoreMerging && OR == OW_PartialEarlierWithFullLater) {
auto *DeadSI = dyn_cast<StoreInst>(DeadLocWrapper.DefInst);
diff --git a/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll b/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
index cc4a507c5ff61e..7b92a82cdac6e7 100644
--- a/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
@@ -658,9 +658,7 @@ exit:
define void @scalable_scalable_redundant_store(ptr %ptr) {
; CHECK-LABEL: @scalable_scalable_redundant_store(
-; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
-; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[GEP]], align 16
-; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR:%.*]], align 32
; CHECK-NEXT: ret void
;
%gep = getelementptr i64, ptr %ptr, i64 2
@@ -684,9 +682,7 @@ define void @scalable_scalable_neg(ptr %ptr) {
define void @scalable_fixed_redundant_store(ptr %ptr) vscale_range(1, 2) {
; CHECK-LABEL: @scalable_fixed_redundant_store(
-; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
-; CHECK-NEXT: store <2 x i64> zeroinitializer, ptr [[GEP]], align 16
-; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR]], align 32
+; CHECK-NEXT: store <vscale x 4 x i64> zeroinitializer, ptr [[PTR:%.*]], align 32
; CHECK-NEXT: ret void
;
%gep = getelementptr i64, ptr %ptr, i64 2
@@ -710,9 +706,7 @@ define void @scalable_fixed_neg(ptr %ptr) vscale_range(1, 2) {
define void @fixed_scalable_redundant_store(ptr %ptr) vscale_range(1, 2) {
; CHECK-LABEL: @fixed_scalable_redundant_store(
-; CHECK-NEXT: [[GEP:%.*]] = getelementptr i64, ptr [[PTR:%.*]], i64 2
-; CHECK-NEXT: store <vscale x 2 x i64> zeroinitializer, ptr [[GEP]], align 16
-; CHECK-NEXT: store <8 x i64> zeroinitializer, ptr [[PTR]], align 64
+; CHECK-NEXT: store <8 x i64> zeroinitializer, ptr [[PTR:%.*]], align 64
; CHECK-NEXT: ret void
;
%gep = getelementptr i64, ptr %ptr, i64 2
More information about the llvm-commits
mailing list