1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Go to file
Sanjay Patel 55ceba42f0 [InstCombine] Fold nuw left-shifts in ugt/ule comparisons.
This transforms

%a = shl nuw %x, c1
%b = icmp {ugt|ule} %a, c0

into

%b = icmp {ugt|ule} %x, (c0 >> c1)

z3:

(declare-const x (_ BitVec 64))
(declare-const c0 (_ BitVec 64))
(declare-const c1 (_ BitVec 64))

(push)
(assert (= x (bvlshr (bvshl x c1) c1)))  ; nuw
(assert (not (= (bvugt (bvshl x c1) c0)
                (bvugt x
                       (bvlshr c0 c1)))))
(check-sat)
(get-model)
(pop)

(push)
(assert (= x (bvlshr (bvshl x c1) c1)))  ; nuw
(assert (not (= (bvule (bvshl x c1) c0)
                (bvule x
                       (bvlshr c0 c1)))))
(check-sat)
(get-model)
(pop)

Patch by bryant!

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

llvm-svn: 285729
2016-11-01 19:19:29 +00:00
bindings [Go bindings] Update for r284678 API changes. 2016-10-20 09:14:39 +00:00
cmake [CMake] Fix rpath construction for out-of-tree builds 2016-11-01 17:44:58 +00:00
docs [RISCV] Add stub backend 2016-11-01 17:27:54 +00:00
examples [BuildingAJIT] Use the remote target triple to construct the TargetMachine in 2016-10-19 22:41:03 +00:00
include [RISCV] Add missing RISCV.def 2016-11-01 17:09:49 +00:00
lib [InstCombine] Fold nuw left-shifts in ugt/ule comparisons. 2016-11-01 19:19:29 +00:00
projects [CMake] Correct configuration order of the sub-projects based on ther dependancies 2016-10-09 20:38:29 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
runtimes [CMake] Make the runtimes directory work with bootstrap builds 2016-10-19 21:50:25 +00:00
test [InstCombine] Fold nuw left-shifts in ugt/ule comparisons. 2016-11-01 19:19:29 +00:00
tools [RISCV] Add RISC-V ELF defines 2016-11-01 16:59:37 +00:00
unittests [RISCV] Recognise riscv32 and riscv64 in triple parsing code 2016-11-01 16:47:54 +00:00
utils [TableGen] Move OperandMatchResultTy enum to MCTargetAsmParser.h 2016-11-01 16:32:05 +00:00
.arcconfig project_id is from another era in phabricator land and does not provide any value. 2016-09-27 15:47:29 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitignore gitignore: ignore VS Code editor files 2016-09-02 22:54:26 +00:00
CMakeLists.txt [CMake] Fix rpath construction for out-of-tree builds 2016-11-01 17:44:58 +00:00
CODE_OWNERS.TXT [RISCV] Add stub backend 2016-11-01 17:27:54 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT Test Commit, removed extraneous newline 2016-11-01 17:54:05 +00:00
LICENSE.TXT Remove autoconf references from LICENSE.TXT 2016-08-12 20:11:03 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt
README.txt Revert rL277454 2016-08-02 13:26:07 +00:00
RELEASE_TESTERS.TXT Adding RELEASE_TESTERS.TXT 2016-07-21 16:46:44 +00:00

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 are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.