Author: Pushpinder Singh Date: 2021-05-11T10:07:13-05:00 New Revision: eca3d68399246765bc6e8c94ffb4d5927b1add12
URL: https://github.com/llvm/llvm-project/commit/eca3d68399246765bc6e8c94ffb4d5927b1add12 DIFF: https://github.com/llvm/llvm-project/commit/eca3d68399246765bc6e8c94ffb4d5927b1add12.diff LOG: Revert "[AMDGPU][OpenMP] Emit textual IR for -emit-llvm -S" This reverts commit 7f78e409d0280c62209e1a7dc8c6d1409acc9184. Added: Modified: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/amdgpu-openmp-toolchain.c Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index c4ea67ea93660..0cad688873b7c 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4394,13 +4394,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-emit-llvm"); } else if (JA.getType() == types::TY_LLVM_BC || JA.getType() == types::TY_LTO_BC) { - // Emit textual llvm IR for AMDGPU offloading for -emit-llvm -S - if (Triple.isAMDGCN() && IsOpenMPDevice) { - if (Args.hasArg(options::OPT_S) && Args.hasArg(options::OPT_emit_llvm)) - CmdArgs.push_back("-emit-llvm"); - } else { - CmdArgs.push_back("-emit-llvm-bc"); - } + CmdArgs.push_back("-emit-llvm-bc"); } else if (JA.getType() == types::TY_IFS || JA.getType() == types::TY_IFS_CPP) { StringRef ArgStr = diff --git a/clang/test/Driver/amdgpu-openmp-toolchain.c b/clang/test/Driver/amdgpu-openmp-toolchain.c index e4b89dcedf01f..5f2bdff549607 100644 --- a/clang/test/Driver/amdgpu-openmp-toolchain.c +++ b/clang/test/Driver/amdgpu-openmp-toolchain.c @@ -71,6 +71,3 @@ // CHECK-C: "x86_64-unknown-linux-gnu" - "clang" // CHECK-C: "x86_64-unknown-linux-gnu" - "clang::as" // CHECK-C: "x86_64-unknown-linux-gnu" - "offload bundler" - -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-EMIT-LLVM-IR -// CHECK-EMIT-LLVM-IR: clang{{.*}}"-cc1"{{.*}}"-triple" "amdgcn-amd-amdhsa"{{.*}}"-emit-llvm" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits