[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 30 13:01:01 PDT 2024


farzonl wrote:

Hi @marcauberer  The change looks good. I'm 99% sure this won't have an effect on the SPIRV backend, however there is still that 1% chance it does.

The tests I want to check landed in this PR
https://github.com/llvm/llvm-project/pull/85979/files 

For convenience this is what you can pass to `llvm-lit`:
- llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveGetLaneIndex.ll  (really this one is the one im concerned about)
- llvm/test/CodeGen/SPIRV/scfg-add-pre-headers.ll 
- llvm/test/CodeGen/SPIRV/transcoding/spirv-private-array-initialization.ll


Since you aren't changing anything in the SPIRV backend the github action didn't trigger. So if you could do one of two things   after I approve, I would appreciate it,

Option 1: build spirv backend and test the above test cases
Should be a straight forward build
```
cmake -B <spirv-debug-build-dir> -G Ninja -S llvm -DLLVM_ENABLE_PROJECTS="llvm;clang" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON
```
Option 2: watch or trigger the SPIR_V Test github actions
https://github.com/llvm/llvm-project/actions/workflows/spirv-tests.yml
make sure the tests pass if they don't and it is one of the tests listed above you might have to revert your change.


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


More information about the cfe-commits mailing list