Skip to content

Commit

Permalink
[SYCL] Fix use of removed ArchType enum (intel#14833)
Browse files Browse the repository at this point in the history
Two concurrent PRs added a new use of and simultaneously removed this
enum. Commit 63c61d8 added a new use, while dc37699 was trying to
delete it.
  • Loading branch information
frasercrmck authored Jul 29, 2024
1 parent dc37699 commit e664798
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <llvm/ADT/StringRef.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/Debug.h>
#include <llvm/TargetParser/Triple.h>

#define DEBUG_TYPE "sycl-spec-const-materializer"

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit e664798

Please sign in to comment.