This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner][AArch64] Don't fold (smulo x, 2) -> (saddo x, x) if VT is i2.
ClosedPublic

Authored by craig.topper on May 23 2022, 8:41 AM.

Details

Summary

If the VT is i2, then 2 is really -2.

Test has not been commited yet, but diff shows the change.

Fixes PR55644.

Diff Detail

Event Timeline

craig.topper created this revision.May 23 2022, 8:41 AM
craig.topper requested review of this revision.May 23 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2022, 8:41 AM
spatel accepted this revision.May 23 2022, 10:01 AM

LGTM - I don't think we'd see this problem in IR with the example test because we'd reduce the intrinsic if there's no use of the multiply result. We probably don't have the corresponding fold here because we don't expect to create these ops in SDAG?

This revision is now accepted and ready to land.May 23 2022, 10:01 AM
This revision was landed with ongoing or failed builds.May 23 2022, 11:14 AM
This revision was automatically updated to reflect the committed changes.