This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Improve support for vselect(Cond, 0, X) -> ANDN(Cond, X)
ClosedPublic

Authored by RKSimon on Sep 18 2017, 6:49 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Sep 18 2017, 6:49 AM
RKSimon retitled this revision from [X86][SSE] Improve support for vselect(Cond, 0, X) -> PAND(Cond, X) to [X86][SSE] Improve support for vselect(Cond, 0, X) -> ANDN(Cond, X).Sep 18 2017, 6:53 AM
RKSimon edited the summary of this revision. (Show Details)Sep 18 2017, 6:56 AM
spatel accepted this revision.Sep 18 2017, 7:10 AM

LGTM.

lib/Target/X86/X86ISelLowering.cpp
30157–30159 ↗(On Diff #115637)

We might be able to remove the legality checks below here now that we have this, but I agree that the bigger cleanup is to make this semi-generic in DAGCombiner, so x86 won't need to do anything else for these patterns.

This revision is now accepted and ready to land.Sep 18 2017, 7:10 AM
This revision was automatically updated to reflect the committed changes.