llvm / llvm/llvm-project

AMDGPU should report 64-bit add/sub with overflow as legal

Open
#167,747 1 comment 0 reactions 1 assignee Claimed by @LU-JOHN View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.