This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Add fold for `~x + x` -> `-1`
ClosedPublic

Authored by goldstein.w.n on Mar 2 2023, 12:30 PM.

Details

Summary

This is generally done by the InstCombine, but can be emitted as an
intermediate step and is cheap to handle.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Mar 2 2023, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2023, 12:30 PM
goldstein.w.n requested review of this revision.Mar 2 2023, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2023, 12:30 PM
This revision is now accepted and ready to land.Mar 2 2023, 2:13 PM
This revision was automatically updated to reflect the committed changes.