1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests
Quentin Colombet 02cfbd1931 [GISel][KnownBits] Update a comment regarding the effect of cache on PHIs
Unlike what I claimed in my previous commit. The caching is
actually not NFC on PHIs.

When we put a big enough max depth, we end up simulating loops.
The cache is effectively cutting the simulation short and we
get less information as a result.
E.g.,
```
v0 = G_CONSTANT i8 0xC0
jump
v1 = G_PHI i8 v0, v2
v2 = G_LSHR i8 v1, 1
```

Let say we want the known bits of v1.
- With cache:
Set v1 cache to we know nothing
v1 is v0 & v2
v0 gives us 0xC0
v2 gives us known bits of v1 >> 1
v1 is in the cache
=> v1 is 0, thus v2 is 0x80
Finally v1 is v0 & v2 => 0x80

- Without cache and enough depth to do two iteration of the loop:
v1 is v0 & v2
v0 gives us 0xC0
v2 gives us known bits of v1 >> 1
v1 is v0 & v2
v0 is 0xC0
v2 is v1 >> 1
Reach the max depth for v1...
unwinding
v1 is know nothing
v2 is 0x80
v0 is 0xC0
v1 is 0x80
v2 is 0xC0
v0 is 0xC0
v1 is 0xC0

Thus now v1 is 0xC0 instead of 0x80.

I've added a unittest demonstrating that.

NFC
2020-02-25 15:56:15 -08:00
..
ADT [APInt] byteSwap - handle any whole byte bitwidth greater than 16-bits 2020-02-15 13:27:06 +00:00
Analysis [LazyCallGraph] Fix ambiguous index value 2020-02-18 23:32:55 -05:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat [MachO] Add cpu(sub)type tests and improve error handling 2020-02-24 10:44:42 -08: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 [GISel][KnownBits] Update a comment regarding the effect of cache on PHIs 2020-02-25 15:56:15 -08:00
DebugInfo Use new FailedWithMessage matcher in DWARFDebugLineTest.cpp 2020-02-24 10:27:00 +01:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine [ORC] Add generic initializer/deinitializer support. 2020-02-19 13:59:32 -08:00
Frontend [OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder. 2020-02-15 01:15:45 -06:00
FuzzMutate [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
IR [Dominators] Use Instruction::comesBefore for block-local queries, NFC 2020-02-20 16:41:51 -08: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 [X86][Disassembler] Fix a bug when disassembling an empty string 2020-01-13 10:42:21 -08:00
MI [unittests] Add InitializePasses.h includes 2019-11-13 19:42:58 -08:00
Object [unittests] Fix "comparison of integers of different signs" warnings 2020-01-14 13:24:51 +01:00
ObjectYAML minidump: Add an "arm64" constant 2019-10-31 11:20:46 +01:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes [test] Disable the Passes/PluginsTest cases on windows with BUILD_SHARED_LIBS 2020-02-10 22:50:36 +02:00
ProfileData Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Remarks [Remarks] Fix error message check in unit test 2019-10-31 15:51:36 -07:00
Support Add methods to data extractor for extracting bytes and fixed length C strings. 2020-02-24 14:17:43 -08:00
TableGen Make unittests include path relative 2020-02-21 10:19:11 +01:00
Target Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
TextAPI [llvm][TextAPI] rename test vars, NFC 2020-02-25 14:28:36 -08:00
tools Recommit: "[llvm-exegesis] Improve error reporting in Assembler.cpp" 2020-02-19 14:40:28 +01:00
Transforms [NFC][SCEV] Piping to pass TTI into SCEVExpander::isHighCostExpansionHelper() 2020-02-25 23:05:56 +03:00
XRay Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
CMakeLists.txt CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00