Index: clang/lib/Basic/Cuda.cpp =================================================================== --- clang/lib/Basic/Cuda.cpp +++ clang/lib/Basic/Cuda.cpp @@ -84,7 +84,7 @@ GFX(810), // stoney GFX(900), // vega, instinct GFX(902), GFX(904), GFX(906), GFX(908), GFX(909), - GFX(1010), GFX(1011), GFX(1012), + GFX(1010), GFX(1011), GFX(1012), GFX(1030), GFX(1031) // clang-format on }; #undef SM Index: clang/test/Driver/hip-offload-arch.hip =================================================================== --- /dev/null +++ clang/test/Driver/hip-offload-arch.hip @@ -0,0 +1,10 @@ +// REQUIRES: clang-driver, x86-registered-target, amdgpu-registered-target + +// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: --offload-arch=gfx1030 \ +// RUN: --offload-arch=gfx1031 \ +// RUN: -nogpuinc -nogpulib \ +// RUN: %s 2>&1 | FileCheck %s + +// CHECK: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx1030"}} +// CHECK: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx1031"}}