| 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!) |
| 4 |
|
| 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 |
| 9 |
|
| 10 |
// CHECK: "-cc1"{{.*}} "-triple" "nvptx |
| 11 |
// CHECK-SAME: "-target-cpu" "sm_52" |
| 12 |
|
| 13 |
// CHECK: ptxas |
| 14 |
// CHECK-SAME: "--gpu-name" "sm_52" |
| 15 |
|
| 16 |
// CHECK: "-cc1"{{.*}} "-target-cpu" "haswell" |