diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 58e1090673fad..49faa193fb7b1 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -3303,7 +3303,7 @@ class OffloadingActionBuilder final { HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) { - DefaultCudaArch = CudaArch::GFX803; + DefaultCudaArch = CudaArch::GFX906; if (Args.hasArg(options::OPT_gpu_bundle_output, options::OPT_no_gpu_bundle_output)) BundleOutput = Args.hasFlag(options::OPT_gpu_bundle_output, diff --git a/clang/test/Driver/cuda-flush-denormals-to-zero.cu b/clang/test/Driver/cuda-flush-denormals-to-zero.cu index c971d15c53560..15525f9c1b814 100644 --- a/clang/test/Driver/cuda-flush-denormals-to-zero.cu +++ b/clang/test/Driver/cuda-flush-denormals-to-zero.cu @@ -25,9 +25,10 @@ // Test the default changing with no argument based on the subtarget in HIP mode // RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=gfx803 -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=FTZ %s // RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=gfx900 -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s +// RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=gfx906 -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s -// Test no subtarget, which should get the denormal setting of the default gfx803 -// RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=FTZ %s +// Test no subtarget, which should get the denormal setting of the default gfx906 +// RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s // Test multiple offload archs with different defaults. // RUN: %clang -x hip -### --target=x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -nocudainc -nogpulib %s 2>&1 | FileCheck -check-prefix=MIXED-DEFAULT-MODE %s diff --git a/clang/test/Driver/hip-default-gpu-arch.hip b/clang/test/Driver/hip-default-gpu-arch.hip index 69d98d0f35695..2bb7afecd806f 100644 --- a/clang/test/Driver/hip-default-gpu-arch.hip +++ b/clang/test/Driver/hip-default-gpu-arch.hip @@ -3,4 +3,4 @@ // RUN: %clang -### -c %s 2>&1 | FileCheck %s -// CHECK: {{.*}}clang{{.*}}"-target-cpu" "gfx803" +// CHECK: {{.*}}clang{{.*}}"-target-cpu" "gfx906"