HomePhabricator

[InstCombine] fold extract+insert into identity shuffle

Description

[InstCombine] fold extract+insert into identity shuffle

This is similar to the existing fold for splats added with:
rL365379

If we can adjust the shuffle mask to include another element
in an identity mask (if it changes vector length, that's an
extract/insert subvector operation in the backend), then that
can eliminate extractelement/insertelement pairs in IR.

All targets are expected to lower shuffles with identity masks
efficiently.

Details

Committed
spatelSun, Sep 8, 12:03 PM
Parents
rL371339: [NFC][InstSimplify] Some tests for dropping null check after uadd.with.overflow…
Branches
Unknown
Tags
Unknown