[PATCH] D113680: [AArch64][SVE] Remove i1 type from isElementTypeLegalForScalableVector
Kerry McLaughlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 12 06:25:22 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG764782215651: [AArch64][SVE] Remove i1 type from isElementTypeLegalForScalableVector (authored by kmclaughlin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113680/new/
https://reviews.llvm.org/D113680
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll
Index: llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll
===================================================================
--- llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll
+++ llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll
@@ -79,6 +79,35 @@
ret void
}
+; CHECK-REMARKS: Scalable vectorization is not supported for all element types found in this loop
+define void @uniform_store_i1(i1* noalias %dst, i64* noalias %start, i64 %N) {
+; CHECK-LABEL: @uniform_store_i1
+; CHECK: vector.body
+; CHECK: %[[GEP:.*]] = getelementptr inbounds i64, <2 x i64*> {{.*}}, i64 1
+; CHECK: %[[ICMP:.*]] = icmp eq <2 x i64*> %[[GEP]], %[[SPLAT:.*]]
+; CHECK: %[[EXTRACT1:.*]] = extractelement <2 x i1> %[[ICMP]], i32 0
+; CHECK: store i1 %[[EXTRACT1]], i1* %dst
+; CHECK: %[[EXTRACT2:.*]] = extractelement <2 x i1> %[[ICMP]], i32 1
+; CHECK: store i1 %[[EXTRACT2]], i1* %dst
+; CHECK-NOT: vscale
+entry:
+ br label %for.body
+
+for.body:
+ %first.sroa = phi i64* [ %incdec.ptr, %for.body ], [ %start, %entry ]
+ %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
+ %iv.next = add i64 %iv, 1
+ %0 = load i64, i64* %first.sroa
+ %incdec.ptr = getelementptr inbounds i64, i64* %first.sroa, i64 1
+ %cmp.not = icmp eq i64* %incdec.ptr, %start
+ store i1 %cmp.not, i1* %dst
+ %cmp = icmp ult i64 %iv, %N
+ br i1 %cmp, label %for.body, label %end, !llvm.loop !0
+
+end:
+ ret void
+}
+
define dso_local void @loop_fixed_width_i128(i128* nocapture %ptr, i64 %N) {
; CHECK-LABEL: @loop_fixed_width_i128
; CHECK: load <4 x i128>, <4 x i128>*
Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
===================================================================
--- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
@@ -226,7 +226,7 @@
if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())
return true;
- if (Ty->isIntegerTy(1) || Ty->isIntegerTy(8) || Ty->isIntegerTy(16) ||
+ if (Ty->isIntegerTy(8) || Ty->isIntegerTy(16) ||
Ty->isIntegerTy(32) || Ty->isIntegerTy(64))
return true;
@@ -241,8 +241,7 @@
if (isa<FixedVectorType>(DataType) && !ST->useSVEForFixedLengthVectors())
return false; // Fall back to scalarization of masked operations.
- return !DataType->getScalarType()->isIntegerTy(1) &&
- isElementTypeLegalForScalableVector(DataType->getScalarType());
+ return isElementTypeLegalForScalableVector(DataType->getScalarType());
}
bool isLegalMaskedLoad(Type *DataType, Align Alignment) {
@@ -263,8 +262,7 @@
DataTypeFVTy->getNumElements() < 2))
return false;
- return !DataType->getScalarType()->isIntegerTy(1) &&
- isElementTypeLegalForScalableVector(DataType->getScalarType());
+ return isElementTypeLegalForScalableVector(DataType->getScalarType());
}
bool isLegalMaskedGather(Type *DataType, Align Alignment) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113680.386832.patch
Type: text/x-patch
Size: 2985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211112/f9cf7c72/attachment.bin>
More information about the llvm-commits
mailing list