diff --git a/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp b/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp index b1f54ee21b78..3637930d72f8 100644 --- a/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp +++ b/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #define DEBUG_TYPE "sycl-spec-const-materializer" @@ -298,9 +299,8 @@ PreservedAnalyses SYCLSpecConstMaterializer::run(Function &F, // Invariant: This pass is only intended to operate on SYCL kernels being // compiled to either `nvptx{,64}-nvidia-cuda`, or `amdgcn-amd-amdhsa` // triples. - auto AT = TargetHelpers::getArchType(*Mod); - if (TargetHelpers::ArchType::Cuda != AT && - TargetHelpers::ArchType::AMDHSA != AT) { + Triple T(Mod->getTargetTriple()); + if (!T.isNVPTX() && !T.isAMDGCN()) { LLVM_DEBUG(dbgs() << "Unsupported architecture\n"); return PreservedAnalyses::all(); }