Skip to content

[DAG] computeKnownBits - ISD::ABDS is zero in the high bits if the input has multiple sign bits #94442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RKSimon opened this issue Jun 5, 2024 · 0 comments · Fixed by #94448
Assignees
Labels
llvm:SelectionDAG SelectionDAGISel as well

Comments

@RKSimon
Copy link
Collaborator

RKSimon commented Jun 5, 2024

Split off from #94344

ABDS alive: https://alive2.llvm.org/ce/z/7_z2Vc

If the inputs are sign extended, then the absolute result is guaranteed to be zero in the (NumSignBits - 1) upper bits.

Noticed while working on #92576

@RKSimon RKSimon added the llvm:SelectionDAG SelectionDAGISel as well label Jun 5, 2024
RKSimon added a commit to RKSimon/llvm-project that referenced this issue Jun 5, 2024
RKSimon added a commit to RKSimon/llvm-project that referenced this issue Jun 5, 2024
… x and y are sign-extended

As reported on llvm#94442 - if x and y have more than one signbit, then the upper bits of its absolute value are guaranteed to be zero

Alive2: https://alive2.llvm.org/ce/z/7_z2Vc
@RKSimon RKSimon self-assigned this Jun 5, 2024
RKSimon added a commit to RKSimon/llvm-project that referenced this issue Jun 5, 2024
RKSimon added a commit to RKSimon/llvm-project that referenced this issue Jun 5, 2024
… x and y are sign-extended

As reported on llvm#94442 - if x and y have more than one signbit, then the upper bits of its absolute value are guaranteed to be zero

Alive2: https://alive2.llvm.org/ce/z/7_z2Vc
RKSimon added a commit that referenced this issue Jun 5, 2024
… x and y are sign-extended (#94448)

As reported on #94442 - if x and y have more than one signbit, then the upper bits of its absolute value are guaranteed to be zero

Sibling PR to #94382

Alive2: https://alive2.llvm.org/ce/z/7_z2Vc

Fixes #94442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
1 participant