LLVM backend for 6502
Go to file
Andrea Di Biagio 05a76eb9f2 [DAGCombiner] Improved target independent vector shuffle combine rule.
This patch improves the existing algorithm in DAGCombiner that
attempts to fold shuffles according to rule:
  shuffle(shuffle(x, y, M1), undef, M2) -> shuffle(y, undef, M3)

Before this change, there were cases where the DAGCombiner conservatively
avoided folding shuffles even if the resulting mask would have been legal.
That is because the algorithm wrongly assumed that commuting
an illegal shuffle mask would always produce an illegal mask.

With this change, we now correctly compute the commuted shuffle mask before
calling method 'isShuffleMaskLegal' on it.
On X86, this improves for example the codegen for the following function:

define <4 x i32> @test(<4 x i32> %A, <4 x i32> %B) {
  %1 = shufflevector <4 x i32> %B, <4 x i32> %A, <4 x i32> <i32 1, i32 2, i32 6, i32 7>
  %2 = shufflevector <4 x i32> %1, <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 2, i32 3>
  ret <4 x i32> %2
}

Before this change the X86 backend (-mcpu=corei7) generated
the following assembly code for function @test:
  shufps $-23, %xmm0, %xmm1  # xmm1 = xmm1[1,2],xmm0[2,3]
  movhlps %xmm1, %xmm1       # xmm1 = xmm1[1,1]
  movaps %xmm1, %xmm0

Now we produce:
  movhlps %xmm0, %xmm0       # xmm0 = xmm0[1,1]

Added extra test cases in combine-vec-shuffle-2.ll to verify that we correctly
fold according to the above-mentioned rule.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215555 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-13 16:09:40 +00:00
autoconf [autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build. 2014-07-29 08:35:03 +00:00
bindings [OCaml] Expose Llvm.get_operand_use. 2014-08-12 02:55:45 +00:00
cmake Fix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigure 2014-08-08 14:32:56 +00:00
docs Fix examples of "named metadata" (some of which isn't named). 2014-08-13 04:54:05 +00:00
examples Temporarily Revert "Nuke the old JIT." as it's not quite ready to 2014-08-07 22:02:54 +00:00
include [SKX] Extended non-temporal load/store instructions for AVX512VL subsets. 2014-08-13 10:46:00 +00:00
lib [DAGCombiner] Improved target independent vector shuffle combine rule. 2014-08-13 16:09:40 +00:00
projects [cmake] Use the external project machinery for libcxxabi so that it can 2014-07-25 10:27:40 +00:00
test [DAGCombiner] Improved target independent vector shuffle combine rule. 2014-08-13 16:09:40 +00:00
tools llvm-objdump: print contents of MachO __unwind_info sections 2014-08-12 11:52:59 +00:00
unittests Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings. 2014-08-13 11:17:41 +00:00
utils [shuffle] Stand back! I'm about to (try to) do math! 2014-08-13 12:27:18 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.gitignore Add Polly to the ignored trees. 2014-06-25 13:13:36 +00:00
CMakeLists.txt Fix building with in-tree libc++abi on FreeBSD 2014-08-01 19:23:15 +00:00
CODE_OWNERS.TXT Add a sentence that all entries should include an email address. 2014-08-04 19:33:25 +00:00
configure [autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build. 2014-07-29 08:35:03 +00:00
CREDITS.TXT Test commit access 2014-08-09 16:05:23 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Track clang r213171 2014-07-16 16:50:34 +00:00
Makefile.rules Temporarily Revert "Nuke the old JIT." as it's not quite ready to 2014-08-07 22:02:54 +00:00
README.txt Trivial test commit. 2014-04-26 19:05:45 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.