Go to file
Pablo Barrio 512f7ee315 [ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations
Summary:
Expressions of the form x < 0 ? 0 :  x; and x < -1 ? -1 : x can be lowered using bit-operations instead of branching or conditional moves

In thumb-mode this results in a two-instruction sequence, a shift followed by a bic or or while in ARM/thumb2 mode that has flexible second operand the shift can be folded into a single bic/or instructions. In most cases this results in smaller code and possibly less branches, and in no case larger than before.

Patch by Martin Svanfeldt

Reviewers: fhahn, pbarrio, rogfer01

Reviewed By: pbarrio, rogfer01

Subscribers: chrib, yroux, eugenis, efriedma, rogfer01, aemerson, javed.absar, kristof.beyls, llvm-commits

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

llvm-svn: 326333
2018-02-28 17:13:07 +00:00
clang Test commit access: apply clang-format suggestion 2018-02-28 16:57:33 +00:00
clang-tools-extra Rename a few checks from misc- to bugprone-. 2018-02-28 14:47:20 +00:00
compiler-rt Disable ASan exceptions on NetBSD 2018-02-27 18:05:49 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc utils: Adapt to llvm r325155 2018-02-23 07:37:03 +00:00
libcxx [libcxx] [test] Fix MSVC warnings and errors. 2018-02-26 20:47:46 +00:00
libcxxabi [demangler] Support for exception specifications on function types. 2018-02-14 01:08:20 +00:00
libunwind [libunwind][MIPS]: Add support for unwinding in N32 processes. 2018-02-27 21:24:02 +00:00
lld [ELF] Process linker scripts deeper when declaring symbols. 2018-02-28 05:55:56 +00:00
lldb Add EmulateInstructionPPC64.cpp to xcode project file. 2018-02-28 04:11:37 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations 2018-02-28 17:13:07 +00:00
openmp [OMPT] Fix inconsistent testcases 2018-02-28 09:28:51 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly isl: "isl_schedule_get_map: handle trees with divergent filter node parameters" 2018-02-26 09:26:41 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

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.