[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)
Maciej Gabka via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 02:12:53 PDT 2024
================
@@ -8086,23 +8086,21 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr,
// Target must have NEON (or MVE, whose vectors are similar enough
// not to need a separate attribute)
- if (!(S.Context.getTargetInfo().hasFeature("neon") ||
- S.Context.getTargetInfo().hasFeature("mve") ||
- S.Context.getTargetInfo().hasFeature("sve") ||
- S.Context.getTargetInfo().hasFeature("sme") ||
+ if (!(S.Context.getTargetInfo().hasFeature("mve") ||
IsTargetCUDAAndHostARM) &&
----------------
mgabka wrote:
it looks to me like the logic here can be simplified and use of this variable can be removed entirely.
After reading
https://github.com/llvm/llvm-project/commit/8b0ea48740935d819618d8254fc45d98179b672c
It looks to me like somebody already disabled these errors when targeting GPUs, so we could just simplify the logic and emit the errors only when user targets M class CPUs, what do you think?
https://github.com/llvm/llvm-project/pull/95224
More information about the cfe-commits
mailing list