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 {
35273527 // compiler phases, including backend and assemble phases.
35283528 ActionList AL;
35293529 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" ))) {
35313533 // 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.
35333536 types::ID Output = Args.hasArg (options::OPT_S)
35343537 ? types::TY_LLVM_IR
35353538 : types::TY_LLVM_BC;
Original file line number Diff line number Diff line change 187187// Check mixed AMDGCNSPIRV and concrete GPU arch.
188188//
189189
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 ]]"
192192// AMDGCNSPIRV: {{".*llvm-spirv.*"}} "--spirv-max-version=1.6" "--spirv-ext=+all" {{.*}} "[[AMDGCNSPV_TMP]]" {{.*}}"-o" "[[AMDGCNSPV_CO:.*out]]"
193193// AMDGCNSPIRV: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}}"-emit-obj" {{.*}}"-target-cpu" "gfx900"{{.*}} "-o" "[[GFX900_OBJ:.*o]]"
194194// AMDGCNSPIRV: {{".*lld.*"}} {{.*}}"-plugin-opt=mcpu=gfx900" {{.*}} "-o" "[[GFX900_CO:.*out]]" {{.*}}"[[GFX900_OBJ]]"
You can’t perform that action at this time.
0 commit comments