OSDN Git Service

[InstCombine] Move SSE/AVX vector blend folding to instcombiner
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 12 Aug 2015 08:08:56 +0000 (08:08 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 12 Aug 2015 08:08:56 +0000 (08:08 +0000)
commit49c9300c28235e389ac2cf316b71e4e86dfedfda
tree7ed5f3b123d7d5f4b98cdfc8cb967c7d0d2f4119
parent8e7b0427c4d48c9c52ebd3de499db244a3feb992
[InstCombine] Move SSE/AVX vector blend folding to instcombiner

As discussed in D11886, this patch moves the SSE/AVX vector blend folding to instcombiner from PerformINTRINSIC_WO_CHAINCombine (which allows us to remove this completely).

InstCombiner already had partial support for this, I just had to add support for zero (ConstantAggregateZero) masks and also the case where both selection inputs were the same (allowing us to ignore the mask).

I also moved all the relevant combine tests into InstCombine/blend_x86.ll

Differential Revision: http://reviews.llvm.org/D11934

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244723 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/CodeGen/X86/combine-avx-intrinsics.ll
test/CodeGen/X86/combine-avx2-intrinsics.ll
test/CodeGen/X86/combine-sse41-intrinsics.ll
test/Transforms/InstCombine/blend_x86.ll