Issue 164496
Summary [HLSL][SPIR-V] Invalid LLVM IR `"convergencectrl"(token poison)` for wave intrinsics `WaveActiveMax`
Labels new issue
Assignees
Reporter luciechoi
    ```
RWStructuredBuffer<uint> Out : register(u0);

[numthreads(8,1,1)]
void main(uint3 TID : SV_GroupThreadID) {
    for (uint i = 0; i < 8; i++) {
        if (i == TID.x) {
 Out[TID.x] = WaveActiveMax(TID.x);
            break;
        }
 }
}
```

```
Convergence control tokens can only be produced by calls to the convergence control intrinsics.
token poison
  %hlsl.wave.active.max2.i = call spir_func i32 @llvm.spv.wave.reduce.umax.i32(i32 %0) [ "convergencectrl"(token poison) ]
in function main
fatal error: error in backend: Broken function found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
```

I was able to reproduce this error locally. Found while working on https://github.com/llvm/offload-test-suite/pull/473.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to