llvm/unittests
Roman Lebedev 7bd6e166d9 [ConstantRange] makeGuaranteedNoWrapRegion(): shl support
Summary:
If all the shifts amount are already poison-producing,
then we can add more poison-producing flags ontop:
https://rise4fun.com/Alive/Ocwi

Otherwise, we should only consider the possible range of shift amts that don't result in poison.

For unsigned range not not overflow, we must not shift out any set bits,
and the actual limit for `x` can be computed by backtransforming
the maximal value we could ever get out of the `shl` - `-1` through
`lshr`. If the `x` is any larger than that then it will overflow.

Likewise for signed range, but just in signed domain..

This is based on the general idea outlined by @nikic in https://reviews.llvm.org/D68672#1714990

Reviewers: nikic, sanjoy

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits, nikic

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375370 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-20 19:36:55 +00:00
..
ADT [ADT][Statistics] Fix test after rL374490 2019-10-11 07:19:54 +00:00
Analysis [LOOPGUARD] Remove asserts in getLoopGuardBranch 2019-10-06 16:39:43 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat [BinaryFormat] Teach identify_magic about Tapi files. 2019-08-21 21:00:16 +00:00
Bitcode Add AutoUpgrade function to add new address space datalayout string to existing datalayouts. 2019-09-18 22:15:58 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen [Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest building 2019-10-18 17:18:21 +00:00
DebugInfo Add GsymCreator and GsymReader. 2019-10-10 17:10:11 +00:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine [JITLink] Switch from an atom-based model to a "blocks and symbols" model. 2019-10-04 03:55:26 +00:00
FuzzMutate [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
IR [ConstantRange] makeGuaranteedNoWrapRegion(): shl support 2019-10-20 19:36:55 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
MC [MC] Fix undefined behavior in MCInstPrinter::formatHex 2019-09-06 01:13:32 +00:00
MI LiveIntervals: Fix handleMoveUp with subreg def moving across a def 2019-10-18 23:24:25 +00:00
Object Add ExceptionStream to llvm::Object::minidump 2019-10-18 14:43:15 +00:00
ObjectYAML Update MinidumpYAML to use minidump::Exception for exception stream 2019-10-18 14:56:19 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileData [SampleFDO] Add profile remapping support for profile on-demand loading used 2019-10-18 22:35:20 +00:00
Remarks [Remarks] Fix warning for ambigous else behind EXPECT macro 2019-10-16 16:43:34 +00:00
Support Disable exit-on-SIGPIPE in lldb 2019-10-18 21:05:30 +00:00
TableGen [UnitTests] Try and pacify gcc-5 2019-10-05 08:57:17 +00:00
Target [ARM] Add dependency on GlobalISel for unit tests to fix shared libs build 2019-10-19 16:40:26 +00:00
TextAPI Reland "[TextAPI] Introduce TBDv4" 2019-10-10 04:24:44 +00:00
tools [Mips][llvm-exegesis] Add a Mips target 2019-10-11 20:26:08 +00:00
Transforms [PGO][PGSO] SizeOpts changes. 2019-10-18 16:46:01 +00:00
XRay [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
CMakeLists.txt [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion 2019-10-03 19:13:39 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00