[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 06:20:00 PDT 2024


================
@@ -85,6 +90,6 @@
 // MISSING: error: Must pass in an explicit nvptx64 gpu architecture to 'nvlink'
 
 // RUN: %clang -target nvptx64-nvidia-cuda -flto -c %s -### 2>&1 \
-// RUN:   | FileCheck -check-prefix=GENERIC %s
+// RUN:   | FileCheck -check-prefix=COMPILE %s
 
----------------
jhuber6 wrote:

```suggestion
// RUN: %clang -target nvptx64-nvidia-cuda -march=sm_52 -march=generic -flto -c %s -### 2>&1 \
// RUN:   | FileCheck -check-prefix=GENERIC %s
```
The test should look like this, using `-march=generic` overrides the previous `-march` and results in the same output as if `-march` was not passed at all.

https://github.com/llvm/llvm-project/pull/85222


More information about the cfe-commits mailing list