File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3527,9 +3527,12 @@ class OffloadingActionBuilder final {
3527
3527
// compiler phases, including backend and assemble phases.
3528
3528
ActionList AL;
3529
3529
Action *BackendAction = nullptr ;
3530
- if (ToolChains.front ()->getTriple ().isSPIRV ()) {
3530
+ if (ToolChains.front ()->getTriple ().isSPIRV () ||
3531
+ (ToolChains.front ()->getTriple ().isAMDGCN () &&
3532
+ GpuArchList[I] == StringRef (" amdgcnspirv" ))) {
3531
3533
// Emit LLVM bitcode for SPIR-V targets. SPIR-V device tool chain
3532
- // (HIPSPVToolChain) runs post-link LLVM IR passes.
3534
+ // (HIPSPVToolChain or HIPAMDToolChain) runs post-link LLVM IR
3535
+ // passes.
3533
3536
types::ID Output = Args.hasArg (options::OPT_S)
3534
3537
? types::TY_LLVM_IR
3535
3538
: types::TY_LLVM_BC;
Original file line number Diff line number Diff line change 187
187
// Check mixed AMDGCNSPIRV and concrete GPU arch.
188
188
//
189
189
190
- // AMDGCNSPIRV: "-cc1" "-triple" "spirv64-amd-amdhsa" {{.*}}"-emit-obj " {{.*}} "-o" "[[AMDGCNSPV_OBJ :.*o ]]"
191
- // AMDGCNSPIRV: {{".*llvm-link.*"}} "-o" "[[AMDGCNSPV_TMP:.*out]]" "[[AMDGCNSPV_OBJ ]]"
190
+ // AMDGCNSPIRV: "-cc1" "-triple" "spirv64-amd-amdhsa" {{.*}}"-emit-llvm-bc " {{.*}} "-o" "[[AMDGCNSPV_BC :.*bc ]]"
191
+ // AMDGCNSPIRV: {{".*llvm-link.*"}} "-o" "[[AMDGCNSPV_TMP:.*out]]" "[[AMDGCNSPV_BC ]]"
192
192
// AMDGCNSPIRV: {{".*llvm-spirv.*"}} "--spirv-max-version=1.6" "--spirv-ext=+all" {{.*}} "[[AMDGCNSPV_TMP]]" {{.*}}"-o" "[[AMDGCNSPV_CO:.*out]]"
193
193
// AMDGCNSPIRV: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}}"-emit-obj" {{.*}}"-target-cpu" "gfx900"{{.*}} "-o" "[[GFX900_OBJ:.*o]]"
194
194
// AMDGCNSPIRV: {{".*lld.*"}} {{.*}}"-plugin-opt=mcpu=gfx900" {{.*}} "-o" "[[GFX900_CO:.*out]]" {{.*}}"[[GFX900_OBJ]]"
You can’t perform that action at this time.
0 commit comments