llvm/lib
Andrea Di Biagio d288259ccd [X86][AVX] Fix wrong lowering of v4x64 shuffles into concat_vector plus extract_subvector nodes.
This patch fixes a bug in the shuffle lowering logic implemented by function
'lowerV2X128VectorShuffle'.

The are few cases where function 'lowerV2X128VectorShuffle' wrongly expands a
shuffle of two v4X64 vectors into a CONCAT_VECTORS of two EXTRACT_SUBVECTOR
nodes. The problematic expansion only occurs when the shuffle mask M has an
'undef' element at position 2, and M is equivalent to mask <0,1,4,5>.
In that case, the algorithm propagates the wrong vector to one of the two
new EXTRACT_SUBVECTOR nodes.

Example:
;;
define <4 x double> @test(<4 x double> %A, <4 x double> %B) {
entry:
  %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32><i32 undef, i32 1, i32 undef, i32 5>
  ret <4 x double> %0
}
;;

Before this patch, llc (-mattr=+avx) generated:
  vinsertf128 $1, %xmm0, %ymm0, %ymm0

With this patch, llc correctly generates:
  vinsertf128 $1, %xmm1, %ymm0, %ymm0

Added test lower-vec-shuffle-bug.ll

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232179 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-13 17:29:49 +00:00
..
Analysis Teach TBAA analysis to report errors on cyclic TBAA metadata rather than hanging. 2015-03-13 07:09:33 +00:00
AsmParser Fix a stack overflow in the assembler when checking that GEPs must be over sized types. 2015-03-10 06:34:57 +00:00
Bitcode
CodeGen Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints. 2015-03-13 12:45:09 +00:00
DebugInfo
ExecutionEngine [Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by 2015-03-11 00:43:26 +00:00
Fuzzer
IR ConstantFold: Fix big shift constant folding 2015-03-13 16:39:46 +00:00
IRReader
LineEditor
Linker
LTO
MC Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints. 2015-03-13 12:45:09 +00:00
Object
Option
Passes
ProfileData InstrProf: Teach llvm-cov to handle universal binaries when given -arch 2015-03-11 02:30:51 +00:00
Support Wrap in __MINGW32__ to avoid warnings from msvc. 2015-03-11 16:09:02 +00:00
TableGen
Target [X86][AVX] Fix wrong lowering of v4x64 shuffles into concat_vector plus extract_subvector nodes. 2015-03-13 17:29:49 +00:00
Transforms Reapply 'Run LICM pass after loop unrolling pass.' 2015-03-12 05:36:01 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile