We are using this helper for our 24-bit arithmetic combines, so we are now able to eliminate multi-use operations that mask the high-bits of 24-bit inputs (e.g. and x, 0xffffff)
Details
Diff Detail
Event Timeline
| lib/Target/AMDGPU/AMDGPUISelLowering.cpp | ||
|---|---|---|
| 2441–2449 | This looks like an overly specific version of computeKnownBits. I was trying to figure out how to factor SimplifyDemandedBits to allow checking multiple uses but never got around to trying it | |
| 2444 | unchecked dyn_cast | |
| 2459–2462 | This can early exit if the first one failed | |
| lib/Target/AMDGPU/AMDGPUISelLowering.cpp | ||
|---|---|---|
| 2441–2449 | For and this could also be >= 8 | |
| lib/Target/AMDGPU/AMDGPUISelLowering.cpp | ||
|---|---|---|
| 2441–2449 | I looked into it, but I thought the cost of doing that would be too high. One idea I had ws to add an extra parameter for when you wanted to consider multiple uses. | |
unchecked dyn_cast