================ @@ -8336,12 +8336,11 @@ static bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr, /// match one of the standard Neon vector types. static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorKind VecKind) { - bool IsTargetCUDAAndHostARM = false; - if (S.getLangOpts().CUDAIsDevice) { - const TargetInfo *AuxTI = S.getASTContext().getAuxTargetInfo(); - IsTargetCUDAAndHostARM = - AuxTI && (AuxTI->getTriple().isAArch64() || AuxTI->getTriple().isARM()); - } + const TargetInfo *AuxTI = S.getASTContext().getAuxTargetInfo(); + bool IsArm = AuxTI && (AuxTI->getTriple().isAArch64() || AuxTI->getTriple().isARM()); + + bool IsTargetCUDAAndHostARM = IsArm && S.getLangOpts().CUDAIsDevice; ---------------- Fznamznon wrote:
This is more of a question to offloading experts of the community. I think all single-source offloading models eventually run into similar problems. It doesn't depend on the language being used (CUDA/OpenMP/SYCL) and what are the architectures. So I wonder if it makes sense to do a more generalized check, something like "if device doesn't support but the host does, dont error out". https://github.com/llvm/llvm-project/pull/127439 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits