[llvm] b1ec1a2 - [AArch64] NFCI: More sensible implementation of isLegalMaskedGatherScatter.

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 03:30:19 PDT 2024


Author: Sander de Smalen
Date: 2024-06-21T10:29:44Z
New Revision: b1ec1a2dc81075eceddd2c6b34b52d2a741fd961

URL: https://github.com/llvm/llvm-project/commit/b1ec1a2dc81075eceddd2c6b34b52d2a741fd961
DIFF: https://github.com/llvm/llvm-project/commit/b1ec1a2dc81075eceddd2c6b34b52d2a741fd961.diff

LOG: [AArch64] NFCI: More sensible implementation of isLegalMaskedGatherScatter.

Gather/Scatter instructions are only available if the whole of SVE
is available.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
index feec1a4289c3a..e7d3a5899cef1 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
@@ -276,7 +276,7 @@ class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
   }
 
   bool isLegalMaskedGatherScatter(Type *DataType) const {
-    if (!ST->hasSVE() || !ST->isNeonAvailable())
+    if (!ST->isSVEAvailable())
       return false;
 
     // For fixed vectors, scalarize if not using SVE for them.


        


More information about the llvm-commits mailing list