1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Go to file
Roman Lebedev b0ff9a0dd3 [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y)
Summary:
https://bugs.llvm.org/show_bug.cgi?id=38123

This pattern will be produced by Implicit Integer Truncation sanitizer,
https://reviews.llvm.org/D48958
https://bugs.llvm.org/show_bug.cgi?id=21530
in unsigned case, therefore it is probably a good idea to improve it.

https://rise4fun.com/Alive/Rny
^ there are more opportunities for folds, i will follow up with them afterwards.

Caveat: this somehow exposes a missing opportunities
in `test/Transforms/InstCombine/icmp-logical.ll`
It seems, the problem is in `foldLogOpOfMaskedICmps()` in `InstCombineAndOrXor.cpp`.
But i'm not quite sure what is wrong, because it calls `getMaskedTypeForICmpPair()`,
which calls `decomposeBitTestICmp()` which should already work for these cases...
As @spatel notes in https://reviews.llvm.org/D49179#1158760,
that code is a rather complex mess, so we'll let it slide.

Reviewers: spatel, craig.topper

Reviewed By: spatel

Subscribers: yamauchi, majnemer, t.p.northover, llvm-commits

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

llvm-svn: 336834
2018-07-11 19:05:04 +00:00
bindings [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePass 2018-05-28 16:58:10 +00:00
cmake [CMake] Teach the build system to codesign built products 2018-07-10 17:32:48 +00:00
docs Revert r336830: [FileCheck] Don't permit overlapping CHECK-DAG 2018-07-11 19:03:00 +00:00
examples [ORC] Update JITCompileCallbackManager to support multi-threaded code. 2018-05-30 01:57:45 +00:00
include [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y) 2018-07-11 19:05:04 +00:00
lib [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y) 2018-07-11 19:05:04 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [CMake] Set per-runtime library directory suffix in runtimes build 2018-07-10 19:13:33 +00:00
test [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y) 2018-07-11 19:05:04 +00:00
tools Revert "[llvm-objdump] Add -demangle (-C) option" 2018-07-11 18:09:52 +00:00
unittests [DebugInfo] Make children iterator bidirectional 2018-07-11 17:11:11 +00:00
utils Revert r336830: [FileCheck] Don't permit overlapping CHECK-DAG 2018-07-11 19:03:00 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt [CMake] Teach the build system to codesign built products 2018-07-10 17:32:48 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take ownership of the MIPS backend 2018-06-21 09:59:44 +00:00
configure
CREDITS.TXT Update my information in the CREDITS file. 2018-06-15 20:02:11 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Test commit: remove a blank line 2018-06-08 21:21:55 +00:00
RELEASE_TESTERS.TXT Remove myself from the release testers list. (NFC) 2018-06-20 21:25:50 +00:00

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.

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.