[llvm] [WIP][AMDGPU] combine uniform AMDGPU lane Intrinsics (PR #116953)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 16:55:24 PST 2024
https://github.com/arsenm requested changes to this pull request.
I am concerned this does not have enough context to be definitively correct after later transformations. Consider a case like this:
```
if (ballot_all(x)) {
uniform_x = readfirstlane x
speculatable_use(uniform_x)
...
}
```
This transform will then produce:
```
if (ballot_all(x)) {
speculatable_use(x)
...
}
```
Which may then later be incorrectly hoisted:
```
speculatable_use(x) // x is not actually uniform anymore
if (ballot_all(x)) { ... }
```
There needs to be something tying the uniformity to the use position
https://github.com/llvm/llvm-project/pull/116953
More information about the llvm-commits
mailing list