[PATCH] [x86] Simplify vector selection
Robert Khasanov
rob.khasanov at gmail.com
Tue Sep 30 10:26:48 PDT 2014
Hi hliao, nadav, anemet, delena,
[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.
Also I removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine.
New tests are not added, existed intrinsics tests on vpcmpeq{bwdq} cover these cases.
http://reviews.llvm.org/D5545
Files:
lib/Target/X86/X86ISelLowering.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5545.14235.patch
Type: text/x-patch
Size: 3434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140930/9f15b605/attachment.bin>
More information about the llvm-commits
mailing list