This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Fold abs(undef) to 0 instead of undef.
ClosedPublic

Authored by craig.topper on May 22 2022, 12:41 PM.

Details

Summary

abs should only produce a positive value or the signed minimum
value. This means we can't fold abs(undef) to undef as that would
allow more values. Fold to 0 instead to match InstSimplify.

Fixes test mentioned in comment on pr55271.

Diff Detail

Event Timeline

craig.topper created this revision.May 22 2022, 12:41 PM
craig.topper requested review of this revision.May 22 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2022, 12:41 PM
nikic accepted this revision.May 22 2022, 12:44 PM
nikic added a subscriber: nikic.

LG

This revision is now accepted and ready to land.May 22 2022, 12:44 PM
This revision was landed with ongoing or failed builds.May 22 2022, 12:56 PM
This revision was automatically updated to reflect the committed changes.