Go to file
Roman Lebedev 183a465dc6 [InstCombine] foldICmpWithLowBitMaskedVal(): handle ~(-1 << y) mask
Summary:
Two folds are happening here:
1. https://rise4fun.com/Alive/oaFX
2. And then `foldICmpWithHighBitMask()` (D52001): https://rise4fun.com/Alive/wsP4

This change doesn't just add the handling for eq/ne predicates,
it actually builds upon the previous `foldICmpWithLowBitMaskedVal()` work,
so **all** the 16 fold variants* are immediately supported.

I'm indeed only testing these two predicates.
I do not feel like re-proving all 16 folds*, because they were already proven
for the general case of constant with all-ones in low bits. So as long as
the mask produces all-ones in low bits, i'm pretty sure the fold is valid.

But required, i can re-prove, let me know.

* eq/ne are commutative - 4 folds; ult/ule/ugt/uge - are not commutative (the commuted variant is InstSimplified), 4 folds; slt/sle/sgt/sge are not commutative - 4 folds. 12 folds in total.

https://bugs.llvm.org/show_bug.cgi?id=38123
https://bugs.llvm.org/show_bug.cgi?id=38708

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342546
2018-09-19 13:35:27 +00:00
clang [Sema] Do not load macros from preamble when LoadExternal is false. 2018-09-19 09:34:55 +00:00
clang-tools-extra [clang-tidy] run-clang-tidy.py - fails using python 3.7 2018-09-19 11:52:20 +00:00
compiler-rt [compiler-rt][TSan] Add TSan runtime support for Go on linux-aarch64. 2018-09-19 11:56:20 +00:00
debuginfo-tests Revert "(Retry) Add a basic integration test for C++ smart pointers" 2018-08-20 19:53:33 +00:00
libclc configure: Rework support for gfx9+ devices that were added post LLVM 3.9 2018-09-15 22:02:01 +00:00
libcxx Remove unused include of "verbose_assert.h" 2018-09-19 02:27:44 +00:00
libcxxabi Merge Demangle change in r342330 to libcxxabi. 2018-09-15 18:25:49 +00:00
libunwind [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs. 2018-09-04 20:57:50 +00:00
lld [COFF] Fix the name mangling of a function in the autoexport exclusion list 2018-09-18 07:22:05 +00:00
lldb Allow use of self.filecheck in LLDB tests (c.f self.expect) 2018-09-18 19:31:47 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [InstCombine] foldICmpWithLowBitMaskedVal(): handle ~(-1 << y) mask 2018-09-19 13:35:27 +00:00
openmp [OPENMP]Increment iterator when the loop is continued. 2018-09-11 17:16:26 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [ScopDetection] Use addUnknown for calls in the AliasSetTracker. 2018-09-11 23:48:14 +00:00
README.md

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.