[clang] [AMDGPU][SPIR-V] Fix treating SPIR-V input as the wrong LLVM-IR (PR #202986)

Manuel Carrasco via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 03:12:20 PDT 2026


mgcarrasco wrote:

@jhuber6 thanks!

This is the status for `-use-spirv-backend`:

- `-use-spirv-backend with -no-offload-new-driver` OK
- `-use-spirv-backend with -offload-new-driver` OK but now it emits a misleading warning that could be confusing `clang++: warning: argument unused during compilation: '-use-spirv-backend'`

For `-no-use-spirv-backend` with or without the new driver, we hit this error (plus the warning):

```
clang++: warning: argument unused during compilation: '-no-use-spirv-backend' [-Wunused-command-line-argument]
: CommandLine Error: Option 'spirv-preserve-auxdata' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
```

Reproducer: `clang++ -x hip hello.hip -O0 --offload-arch=amdgcnspirv -no-use-spirv-backend --offload-new-driver ` (same for old driver)

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


More information about the cfe-commits mailing list