This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFold] Fold binary arithmetic on scalable vector splats.
ClosedPublic

Authored by efriedma on Sep 9 2020, 3:39 PM.

Details

Summary

It's a nice simplification, and it confuses instcombine if we don't do it.

Diff Detail

Event Timeline

efriedma created this revision.Sep 9 2020, 3:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2020, 3:39 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
efriedma requested review of this revision.Sep 9 2020, 3:39 PM
david-arm added inline comments.Sep 10 2020, 3:00 AM
llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll
44

Is it worth also adding a test case for the integer divrem case where C2=0 that we now support where we return undef?

efriedma updated this revision to Diff 291110.Sep 10 2020, 6:51 PM

Add an extra test so the divide path is exercised.

david-arm accepted this revision.Sep 10 2020, 11:33 PM

LGTM! Thanks for adding the test!

This revision is now accepted and ready to land.Sep 10 2020, 11:33 PM
This revision was landed with ongoing or failed builds.Sep 11 2020, 4:42 PM
This revision was automatically updated to reflect the committed changes.