1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests/Support
Simon Pilgrim 8366289c89 [DemandedBits] Improve accuracy of Add propagator
The current demand propagator for addition will mark all input bits at and right of the alive output bit as alive. But carry won't propagate beyond a bit for which both operands are zero (or one/zero in the case of subtraction) so a more accurate answer is possible given known bits.

I derived a propagator by working through truth tables and using a bit-reversed addition to make demand ripple to the right, but I'm not sure how to make a convincing argument for its correctness in the comments yet. Nevertheless, here's a minimal implementation and test to get feedback.

This would help in a situation where, for example, four bytes (<128) packed into an int are added with four others SIMD-style but only one of the four results is actually read.

Known A:     0_______0_______0_______0_______
Known B:     0_______0_______0_______0_______
AOut:        00000000001000000000000000000000
AB, current: 00000000001111111111111111111111
AB, patch:   00000000001111111000000000000000

Committed on behalf of: @rrika (Erika)

Differential Revision: https://reviews.llvm.org/D72423
2020-08-17 12:54:09 +01:00
..
DynamicLibrary
AlignmentTest.cpp [Align] Remove operations on MaybeAlign that asserted that it had a defined value. 2020-05-22 21:54:28 -07:00
AlignOfTest.cpp
AllocatorTest.cpp [Allocator] Make Deallocate() pass alignment and make it use (de)allocate_buffer 2020-05-02 16:08:46 +02:00
AnnotationsTest.cpp
ARMAttributeParser.cpp
ArrayRecyclerTest.cpp
Base64Test.cpp
BinaryStreamTest.cpp
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp
CachePruningTest.cpp
Casting.cpp
CheckedArithmeticTest.cpp
Chrono.cpp
CMakeLists.txt [SuffixTree][MachOpt] Factoring out Suffix Tree and adding Unit Tests 2020-06-08 12:44:18 -07:00
CommandLineTest.cpp [Support][CommandLine] Delete unused llvm:🆑:ParseEnvrironmentOptions 2020-07-31 10:48:09 -07:00
CompressionTest.cpp [CMake] Simplify CMake handling for zlib 2020-08-11 20:22:11 -07:00
ConvertUTFTest.cpp
CrashRecoveryTest.cpp [llvm][NFC] Add missing 'override's in unittests/ 2020-07-17 17:35:59 -07:00
CRCTest.cpp
DataExtractorTest.cpp [Support] Make DataExtractor error messages more clear 2020-06-02 12:57:51 +02:00
DebugCounterTest.cpp
DebugTest.cpp
DJBTest.cpp
ELFAttributeParserTest.cpp [llvm][NFC] Add missing 'override's in unittests/ 2020-07-17 17:35:59 -07:00
EndianStreamTest.cpp
EndianTest.cpp
ErrnoTest.cpp
ErrorOrTest.cpp
ErrorTest.cpp
ExtensibleRTTITest.cpp
FileCheckTest.cpp [FileCheckTest] Supress new warning 2020-08-08 20:45:24 +02:00
FileCollectorTest.cpp
FileOutputBufferTest.cpp [Support] Allow FileOutputBuffer::create to create an empty file 2020-05-05 08:11:58 -07:00
FileUtilitiesTest.cpp
formatted_raw_ostream_test.cpp [Support] Fix formatted_raw_ostream for UTF-8 2020-07-06 16:18:15 +01:00
FormatVariadicTest.cpp [LLVM] Update formatv() documentation to clarify no escape for } 2020-07-22 15:30:40 -07:00
GlobPatternTest.cpp Revert rGca18ce1a00cd8b7cb7ce0e130440f5ae1ffe86ee "GlobPattern.h - remove unnecessary BitVector.h/StringRef.h includes. NFC" 2020-05-17 18:51:21 +01:00
Host.cpp [SystemZ/ZOS] Implement computeHostNumPhysicalCores 2020-08-12 08:31:33 -04:00
IndexedAccessorTest.cpp
ItaniumManglingCanonicalizerTest.cpp
JSONTest.cpp Revert "Disable a JSONTest.Integers test with all MSVCs, PR46470" 2020-06-26 22:30:24 -04:00
KnownBitsTest.cpp [DemandedBits] Improve accuracy of Add propagator 2020-08-17 12:54:09 +01:00
KnownBitsTest.h [DemandedBits] Improve accuracy of Add propagator 2020-08-17 12:54:09 +01:00
LEB128Test.cpp
LineIteratorTest.cpp
LockFileManagerTest.cpp
ManagedStatic.cpp
MatchersTest.cpp
MathExtrasTest.cpp
MD5Test.cpp
MemoryBufferTest.cpp
MemoryTest.cpp
NativeFormatTests.cpp
OptimizedStructLayoutTest.cpp
ParallelTest.cpp [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
Path.cpp [Support] Class to facilitate file locking 2020-07-30 13:42:20 +07:00
ProcessTest.cpp [Support] Silence warning: comparison of integers of different signs: 'const int' and 'const unsigned long' 2020-05-06 09:12:00 -04:00
ProgramTest.cpp [Support] Add file lock/unlock functions 2020-07-28 16:44:23 +07:00
raw_ostream_test.cpp [Support][unittest] Fix asan failure after D81156 2020-06-09 17:48:00 -07:00
raw_pwrite_stream_test.cpp
raw_sha1_ostream_test.cpp
RegexTest.cpp
ReplaceFileTest.cpp
ReverseIterationTest.cpp
RISCVAttributeParserTest.cpp
ScaledNumberTest.cpp
SourceMgrTest.cpp
SpecialCaseListTest.cpp [clang/llvm] As part of using inclusive language within 2020-06-20 16:03:58 -07:00
SuffixTreeTest.cpp [SuffixTree][MachOpt] Factoring out Suffix Tree and adding Unit Tests 2020-06-08 12:44:18 -07:00
SwapByteOrderTest.cpp
SymbolRemappingReaderTest.cpp
TargetParserTest.cpp Use llvm::is_contained where appropriate (NFC) 2020-08-01 21:51:06 -07:00
TarWriterTest.cpp Add a comment to TarWriterTest.LongFilename 2020-04-27 13:59:02 -04:00
TaskQueueTest.cpp
Threading.cpp
ThreadLocalTest.cpp
ThreadPool.cpp Revert rGf0bab7875e78e01c149d12302dcc4b6d4c43e25c - "Triple.h - reduce Twine.h include to forward declarations. NFC." 2020-06-26 14:46:40 +01:00
TimerTest.cpp
ToolOutputFileTest.cpp [Support] Use outs() in ToolOutputFile 2020-06-04 14:56:35 +02:00
TrailingObjectsTest.cpp
TrigramIndexTest.cpp
TypeNameTest.cpp
TypeTraitsTest.cpp
UnicodeTest.cpp
VersionTupleTest.cpp
VirtualFileSystemTest.cpp Revert "Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2" 2020-06-04 14:59:45 +01:00
WithColorTest.cpp [Support] Replace 'DisableColors' boolean with 'ColorMode' enum 2020-06-08 09:48:47 -07:00
xxhashTest.cpp
YAMLIOTest.cpp [yaml][clang-tidy] Fix multiline YAML serialization 2020-07-09 02:41:58 -07:00
YAMLParserTest.cpp