Go to file
Andrea Di Biagio b23bad11e7 [DAGCombiner] Improve the folding of target independet shuffles to Undef.
When combining a pair of shuffle nodes, check if the combined shuffle mask is
trivially Undef. In case, immediately fold that pair of shuffles to Undef.

The lack of checks for undef masks was the root-cause of a poor-codegen bug
in the dag combiner.

Example:
  %1 = shufflevector <4 x i32> %A, <4 x i32> %B, <4 x i32> <i32 4, i32 1, i32 1, i32 6>
  %2 = shufflevector <4 x i32> %1, <4 x i32> undef, <4 x i32> <i32 0, i32 4, i32 1, i32 6>
  %3 = shufflevector <4 x i32> %2, <4 x i32> undef, <4 x i32> <i32 1, i32 5, i32 3, i32 3>

Before this patch, on x86 (with -mcpu=corei7) we failed to fold the entire
sequence to Undef value and therefore we generated:
  shufps $-123, %xmm1, $xmm0
  pshufd $-46, %xmm0, %xmm0

With this patch, the entire shuffle sequence is folded to Undef and no
shuffles are generated in the output assembly.

Added new test cases to test 'combine-vec-shuffle-5.ll'.

llvm-svn: 215797
2014-08-16 00:29:44 +00:00
clang [libclang] Introduce clang_File_isEqual for comparing CXFile handles. 2014-08-16 00:26:19 +00:00
clang-tools-extra ClangTidyTests: Suppress FixHeaderGuards on win32 for now. 2014-08-13 22:12:38 +00:00
compiler-rt [TSan] Initialize flags as early as possible. Disables back coredump, accidentally enabled in r215479. Add a test. 2014-08-15 19:53:51 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc relational: Add islessequal(floatN) builtin 2014-08-01 21:50:59 +00:00
libcxx Readding FreeBSD support to lit.cfg. Patch from Pawel Worach. 2014-08-15 23:24:00 +00:00
libcxxabi Fix the CMake build on Mac when setting MACOSX_DEPLOYMENT_TARGET=10.6 2014-08-12 18:18:07 +00:00
lld [mach-o] improve darwin driver 'usage' message when run with no args 2014-08-15 22:42:46 +00:00
lldb In the CMake build, convert lldbHost to be a single static library. 2014-08-15 23:50:36 +00:00
llvm [DAGCombiner] Improve the folding of target independet shuffles to Undef. 2014-08-16 00:29:44 +00:00
openmp Commit PowerPC64 support from Carlo Bertolli at IBM. 2014-08-07 10:12:54 +00:00
polly Added support for modulo expressions 2014-08-15 01:14:11 +00:00