AMDGPU should report 64-bit add/sub with overflow as legal
Open
backend:AMDGPU
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Currently for SelectionDAG, we lie and report 64-bit add and sub as legal. For the same reason, we should report the with-overflow cases as legal. The 64-bit pseudo expansion does produce the carry-out, so it should be simple to wire the overflow ops to use it.
This will enable various combines that check the legality of the overflow operation. One example is the combine added by #161651; this should be profitable for the i64 case.
Contributor guide
Assessment
This issue has not been assessed yet.