[X86][InstCombine] Teach SimplifyDemandedVectorElts to handle scalar round intrinsics...
authorCraig Topper <craig.topper@gmail.com>
Wed, 14 Dec 2016 03:17:30 +0000 (03:17 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 14 Dec 2016 03:17:30 +0000 (03:17 +0000)
commiteb6a20e79ed4a5ac8d5f61f7372bb633c7362378
treef582a662bab3c3b210043da9047358b16053f51c
parenta0372dec261d137973b29ed14376230c372b4290
[X86][InstCombine] Teach SimplifyDemandedVectorElts to handle scalar round 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. Similarly we clear bit 0 for optimizing operand 0.

Also calculate UndefElts correctly.

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

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