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 // REQUIRES: x86-registered-target
6 // REQUIRES: nvptx-registered-target
8 // RUN: %clang -### --target=x86_64-linux-gnu -c \
9 // RUN: -march=haswell %s 2>&1 | FileCheck %s
10 // RUN: %clang -### --target=x86_64-linux-gnu -c \
11 // RUN: -march=haswell --cuda-gpu-arch=sm_35 %s 2>&1 | FileCheck %s
13 // CHECK: "-cc1"{{.*}} "-triple" "nvptx
14 // CHECK-SAME: "-target-cpu" "sm_35"
17 // CHECK-SAME: "--gpu-name" "sm_35"
19 // CHECK: "-cc1"{{.*}} "-target-cpu" "haswell"