[AMDGPU] CodeGen regressions after #154336
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
#154336 causes performance regressions in a few of our graphics benchmarks. From staring at some large before-and-after shader dumps it seems that the slower shaders simply have more computational instructions in them (v_mul_f32, v_fme_f32 and similar). I tried automatically reducing a test case and came up with: [r.txt](https://github.com/user-attachments/files/23094138/r.txt)
```
$ opt -S -p=instcombine,scalarizer,instcombine < r.txt
```
Before #154336, all the math is removed and the function just returns `poison`. After #154336, none of the math is removed.
Contributor guide
Research direction
Start with the attached r.txt reproducer and run `opt -S -p=instcombine,scalarizer,instcombine < r.txt` to compare behavior before and after #154336. Trace why the math is no longer removed and verify that the reduced function again returns `poison` without the extra computational instructions.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100