This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering][ARM][AArch64] Remove usage of NoSignedWrap/NoUnsignedWrap from AVGFLOOR/CEIL transform.
ClosedPublic

Authored by craig.topper on May 31 2023, 4:50 PM.

Details

Summary

Use computeOverflowForUnsignedAdd and computeOverflowForSignedAdd
instead. Unfortunately, this recomputes some known bits and sign bits
we may have already computed, but was the easiest fix without a lot
of restructuring.

This recovers the regressions from D151472.

Diff Detail

Event Timeline

craig.topper created this revision.May 31 2023, 4:50 PM
craig.topper requested review of this revision.May 31 2023, 4:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 4:50 PM
craig.topper edited the summary of this revision. (Show Details)
RKSimon accepted this revision.Jun 1 2023, 10:53 AM

LGTM with one possible minor

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
1050

I added DAG::computeOverflowForAdd wrapper to allow us to merge Signed/Unsigned paths - not sure if its useful here?

This revision is now accepted and ready to land.Jun 1 2023, 10:53 AM

Use Simon's suggestion.

This revision was landed with ongoing or failed builds.Jun 1 2023, 2:20 PM
This revision was automatically updated to reflect the committed changes.