This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Legalize abs(x) -> umin(x,sub(0,x)) iff umin/sub are legal
ClosedPublic

Authored by RKSimon on Nov 25 2020, 7:40 AM.

Details

Reviewers
spatel
lebedev.ri
Summary

If umin() is legal, this is likely to result in smaller codegen expansion for abs(x) than the xor(add,ashr) method.

Followup to D92095

Alive2: https://alive2.llvm.org/ce/z/8nuX6s

Diff Detail

Event Timeline

RKSimon created this revision.Nov 25 2020, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2020, 7:40 AM
RKSimon requested review of this revision.Nov 25 2020, 7:40 AM
This revision is now accepted and ready to land.Nov 25 2020, 8:28 AM
RKSimon closed this revision.Nov 25 2020, 10:25 AM

Closed by rG9c86c5e8add23a29fb19f7c0ac366a2063a5073a - I just forgot to tag the commit message