Go to file
Alex Bradbury d05eae7a7b [RISCV] Add patterns for RV64I SLLW/SRLW/SRAW instructions
This restores support for selecting the SLLW/SRLW/SRAW instructions, which was
removed in rL348067 as the previous patterns made some unsafe assumptions.
Also see the related llvm-dev discussion
<http://lists.llvm.org/pipermail/llvm-dev/2018-December/128497.html>

Ultimately I didn't introduce a custom SelectionDAG node, but instead added a
DAG combine that inserts an AssertZext i5 on the shift amount for an i32
variable-length shift and also added an ANY_EXTEND DAG-combine which will
instead produce a SIGN_EXTEND for an i32 variable-length shift, increasing the
opportunity to safely select SLLW/SRLW/SRAW.

There are obviously different ways of addressing this (a number discussed in
the llvm-dev thread), so I'd welcome further feedback and comments.

Note that there are now some cases in
test/CodeGen/RISCV/rv64i-exhaustive-w-insts.ll where sraw/srlw/sllw is
selected even though sra/srl/sll could be used without any extra instructions.
Given both are semantically equivalent, there doesn't seem a good reason to
prefer one vs the other. Given that would require more logic to still select
sra/srl/sll in those cases, I've left it preferring the *w variants.

Differential Revision: https://reviews.llvm.org/D56264

llvm-svn: 350992
2019-01-12 07:32:31 +00:00
clang NFC: Port loop to cxx_range_for 2019-01-12 00:42:59 +00:00
clang-tools-extra [clang-tidy] new check 'readability-redundant-preprocessor' 2019-01-11 07:59:47 +00:00
compiler-rt [sanitizer] Move android's GetPageSize to a header (NFC) 2019-01-12 00:09:24 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc cmake: Install libraries to DATADIR from GNUInstallDirs 2019-01-07 20:20:37 +00:00
libcxx Change from a to a . Fixes PR#39871. 2019-01-11 21:57:12 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind Revert "[Sparc] Add Sparc V8 support" 2019-01-10 01:08:31 +00:00
lld Add a release note about MSP430 support. 2019-01-11 22:31:35 +00:00
lldb Add SymbolFileBreakpad. 2019-01-12 03:17:39 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [RISCV] Add patterns for RV64I SLLW/SRLW/SRAW instructions 2019-01-12 07:32:31 +00:00
openmp [OpenMP][libomptarget] Use shared memory variable for tracking parallel level 2019-01-09 18:30:14 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
pstl [pstl] Fix compile errors when PARALLEL_POLICIES is disabled 2019-01-10 11:23:33 +00:00
.arcconfig Add an .arcconfig for the top of the git monorepo. 2019-01-11 16:27:14 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

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