Page MenuHomePhabricator

[x86] Simplify vector selection
Needs RevisionPublic

Authored by rob.khasanov on Sep 30 2014, 10:26 AM.

Details

Summary

[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros.
This transformation worked if selector is produced by SETCC, however SETCC is needed only if we consider to swap operands. So I replaced SETCC check for this case.
New tests are not added, existed intrinsics tests on vpcmpeq{bwdq} cover these cases.

Diff Detail

Event Timeline

rob.khasanov retitled this revision from to [x86] Simplify vector selection .
rob.khasanov updated this object.
rob.khasanov edited the test plan for this revision. (Show Details)
rob.khasanov added reviewers: hliao, nadav, anemet, delena.
rob.khasanov added a subscriber: Unknown Object (MLST).
rob.khasanov updated this object.
rob.khasanov added a reviewer: chandlerc.

Added a test case for VSELECT simplification.
Removed changes corresponding to intrinsics lowering, it will go as separate patch.

Added more test cases

chandlerc requested changes to this revision.Mar 29 2015, 1:42 PM
chandlerc edited edge metadata.

Is this still relevant? A lot has changed w/ this part of LLVM since October.

This revision now requires changes to proceed.Mar 29 2015, 1:42 PM