This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Simplify shuffle mask index if the referenced input element is UNDEF
ClosedPublic

Authored by RKSimon on Aug 7 2017, 5:45 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Aug 7 2017, 5:45 AM
zvi added inline comments.Aug 7 2017, 9:59 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
15130 ↗(On Diff #109972)

Do the affected tests cover both the 'if' and the 'else'?

RKSimon added inline comments.Aug 7 2017, 10:49 AM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
15130 ↗(On Diff #109972)

Not properly, I'll add some extra tests

RKSimon updated this revision to Diff 110106.Aug 7 2017, 3:32 PM

Updated with second test that simplifies the mask based on both shuffle inputs (note: further improvements are possible on this shuffle in future patches).

zvi accepted this revision.Aug 7 2017, 11:04 PM
This revision is now accepted and ready to land.Aug 7 2017, 11:04 PM
This revision was automatically updated to reflect the committed changes.