[X86] Teach the backend how to fold SSE4.1/AVX/AVX2 blend intrinsics.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 15 May 2014 15:18:15 +0000 (15:18 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 15 May 2014 15:18:15 +0000 (15:18 +0000)
commit9836c47ea6184cadcbf8cc522e170960666935ee
treee25b351a75070abf8671d2afba8e6f479c6831b2
parent1f05322d96319651c484a90eead4cebd6bd67ad3
[X86] Teach the backend how to fold SSE4.1/AVX/AVX2 blend intrinsics.

Added target specific combine rules to fold blend intrinsics according
to the following rules:
 1) fold(blend A, A, Mask) -> A;
 2) fold(blend A, B, <allZeros>) -> A;
 3) fold(blend A, B, <allOnes>) -> B.

Added two new tests to verify that the new folding rules work for all
the optimized blend intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208895 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/combine-avx-intrinsics.ll [new file with mode: 0644]
test/CodeGen/X86/combine-avx2-intrinsics.ll
test/CodeGen/X86/combine-sse41-intrinsics.ll [new file with mode: 0644]