[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95102)

Momchil Velikov via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 05:53:57 PDT 2024


================
@@ -8084,29 +8084,6 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr,
         AuxTI && (AuxTI->getTriple().isAArch64() || AuxTI->getTriple().isARM());
   }
 
-  // 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") ||
-        IsTargetCUDAAndHostARM) &&
-      VecKind == VectorKind::Neon) {
-    S.Diag(Attr.getLoc(), diag::err_attribute_unsupported)
-        << Attr << "'neon', 'mve', 'sve' or 'sme'";
-    Attr.setInvalid();
-    return;
-  }
-  if (!(S.Context.getTargetInfo().hasFeature("neon") ||
----------------
momchil-velikov wrote:

You can preserve the behaviour for MVE if you alter the diagnostics condition to be
`"NEON type seen" && "no MVE" && "compiling for  M-class".`

https://github.com/llvm/llvm-project/pull/95102


More information about the cfe-commits mailing list