1 // Checks that cuda compilation does the right thing when passed -march.
2 // (Specifically, we want to pass it to host compilation, but not to device
3 // compilation or ptxas!)
5 // RUN: %clang -### --target=x86_64-linux-gnu -c \
6 // RUN: -nogpulib -nogpuinc -march=haswell %s 2>&1 | FileCheck %s
7 // RUN: %clang -### --target=x86_64-linux-gnu -c \
8 // RUN: -nogpulib -nogpuinc -march=haswell --cuda-gpu-arch=sm_52 %s 2>&1 | FileCheck %s
10 // CHECK: "-cc1"{{.*}} "-triple" "nvptx
11 // CHECK-SAME: "-target-cpu" "sm_52"
14 // CHECK-SAME: "--gpu-name" "sm_52"
16 // CHECK: "-cc1"{{.*}} "-target-cpu" "haswell"