[X86][InstCombine] Teach SimplifyDemandedVectorElts to handle scalar min/max/cmp...
authorCraig Topper <craig.topper@gmail.com>
Wed, 14 Dec 2016 03:17:27 +0000 (03:17 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 14 Dec 2016 03:17:27 +0000 (03:17 +0000)
commita0372dec261d137973b29ed14376230c372b4290
tree716021fc604f16e793337be1a95db4cf45122db7
parentecb10f4a9af046a5bfb9094e023d122469673649
[X86][InstCombine] Teach SimplifyDemandedVectorElts to handle scalar min/max/cmp intrinsics more correctly.

Now we only pass bit 0 of the DemandedElts to optimize operand 1 as we recurse since the upper bits are unused.

Also calculate UndefElts correctly.

Simplify InstCombineCalls for these instrinics to just call SimplifyDemandedVectorElts for the call instrution to reuse this support.

llvm-svn: 289628
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp