Page MenuHomePhabricator

[InstSimplify] Properly constrain {insert,extract}_subvector intrinsic fold
ClosedPublic

Authored by joechrisellis on May 18 2021, 9:57 AM.

Details

Summary

The previous rule:

(insert_vector _, (extract_vector X, 0), 0) -> X

is not quite correct. The correct fold should be:

(insert_vector Y, (extract_vector X, 0), 0) -> X
where: Y is X, or Y is undef

This commit updates the pattern.

Diff Detail

Event Timeline

joechrisellis created this revision.May 18 2021, 9:57 AM
joechrisellis requested review of this revision.May 18 2021, 9:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 9:57 AM

Remove unused %pg variable in test.

peterwaller-arm accepted this revision.May 19 2021, 7:52 AM

LGTM, but I missed the issue on the first iteration so please wait for a second accept.

This revision is now accepted and ready to land.May 19 2021, 7:52 AM
paulwalker-arm accepted this revision.May 20 2021, 9:44 AM