1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests/IR
Roman Lebedev 434e59f951 [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

llvm-svn: 375370
2019-10-20 19:36:55 +00:00
..
AsmWriterTest.cpp IR: Cleanup after test to silence ASAN builds 2019-08-03 15:40:00 +00:00
AttributesTest.cpp [Alignment] Migrate Attribute::getWith(Stack)Alignment 2019-10-15 12:56:24 +00:00
BasicBlockTest.cpp [FastISel] Fix insertion of unconditional branches during FastISel 2019-09-20 13:22:59 +00:00
CFGBuilder.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
CFGBuilder.h
CMakeLists.txt
ConstantRangeTest.cpp [ConstantRange] makeGuaranteedNoWrapRegion(): shl support 2019-10-20 19:36:55 +00:00
ConstantsTest.cpp [Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned) 2019-10-15 11:24:36 +00:00
DataLayoutTest.cpp [LLVM][Alignment] Introduce Alignment Type in DataLayout 2019-08-05 09:00:43 +00:00
DebugInfoTest.cpp
DebugTypeODRUniquingTest.cpp
DominatorTreeBatchUpdatesTest.cpp
DominatorTreeTest.cpp
FunctionTest.cpp [Alignment][NFC] Value::getPointerAlignment returns MaybeAlign 2019-10-15 13:58:22 +00:00
InstructionsTest.cpp [ASan] Fix IRTests/InstructionsTest.UnaryOperator 2019-10-14 19:17:31 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [IR] Reimplement FPMathOperator::classof as a whitelist. 2019-10-18 16:16:36 +00:00
LegacyPassManagerTest.cpp
ManglerTest.cpp
MDBuilderTest.cpp
MetadataTest.cpp Print quoted backslashes in LLVM IR as \\ instead of \5C 2019-10-10 18:31:57 +00:00
ModuleTest.cpp
PassBuilderCallbacksTest.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
PassManagerTest.cpp
PatternMatch.cpp [PatternMatch] Add m_SExtOrSelf(), m_ZExtOrSExtOrSelf() matchers + unittests 2019-09-27 21:53:04 +00:00
TimePassesTest.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
TypesTest.cpp
UserTest.cpp
UseTest.cpp
ValueHandleTest.cpp
ValueMapTest.cpp Replace non-recursive sys::Mutex users with std::mutex 2019-08-07 11:59:44 +00:00
ValueTest.cpp [Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned) 2019-10-15 11:24:36 +00:00
VectorTypesTest.cpp [SVE][IR] Scalable Vector size queries and IR instruction support 2019-10-08 12:53:54 +00:00
VerifierTest.cpp
WaymarkTest.cpp