LLVM backend for 6502
Go to file
Simon Pilgrim 44226ffc19 [X86][SSE] Vectorized i8 and i16 shift operators
This patch ensures that SHL/SRL/SRA shifts for i8 and i16 vectors avoid scalarization. It builds on the existing i8 SHL vectorized implementation of moving the shift bits up to the sign bit position and separating the 4, 2 & 1 bit shifts with several improvements:

1 - SSE41 targets can use (v)pblendvb directly with the sign bit instead of performing a comparison to feed into a VSELECT node.
2 - pre-SSE41 targets were masking + comparing with an 0x80 constant - we avoid this by using the fact that a set sign bit means a negative integer which can be compared against zero to then feed into VSELECT, avoiding the need for a constant mask (zero generation is much cheaper).
3 - SRA i8 needs to be unpacked to the upper byte of a i16 so that the i16 psraw instruction can be correctly used for sign extension - we have to do more work than for SHL/SRL but perf tests indicate that this is still beneficial.

The i16 implementation is similar but simpler than for i8 - we have to do 8, 4, 2 & 1 bit shifts but less shift masking is involved. SSE41 use of (v)pblendvb requires that the i16 shift amount is splatted to both bytes however.

Tested on SSE2, SSE41 and AVX machines.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239509 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-11 07:46:37 +00:00
autoconf [bpf] enable BPF backend in autoconf build 2015-06-09 18:53:30 +00:00
bindings
cmake [cmake] [OCaml] Make ocamldoc targets depend on output files 2015-06-07 19:22:22 +00:00
docs [TableGen] Correct the documentation for 'foreach' in the Language Intro. 2015-06-06 00:44:42 +00:00
examples BrainF.cpp: Update CreateCall() according to r237624. 2015-05-19 06:50:19 +00:00
include LLVM support for vector quad bit permute and gather instructions through builtins 2015-06-11 06:21:25 +00:00
lib [X86][SSE] Vectorized i8 and i16 shift operators 2015-06-11 07:46:37 +00:00
projects
test [X86][SSE] Vectorized i8 and i16 shift operators 2015-06-11 07:46:37 +00:00
tools LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
unittests Removing spurious semi colons; NFC. 2015-06-09 12:03:46 +00:00
utils Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and create*MCSubtargetInfo(). NFC. 2015-06-10 12:11:26 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [bpf] make BPF backend non-experimental 2015-06-09 15:46:00 +00:00
CODE_OWNERS.TXT Added Andrey Churbanov as the owner of the OpenMP runtime library code 2015-05-05 20:17:53 +00:00
configure [bpf] enable BPF backend in autoconf build 2015-06-09 18:53:30 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Deprecate in-source autotools builds 2015-05-04 02:04:54 +00:00
Makefile.rules
README.txt

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

This directory and its subdirectories contain source code for LLVM,
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.