1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test
James Molloy dd0344f002 [Thumb] Teach ISel how to lower compares of AND bitmasks efficiently
For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)).

1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS.
2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS.
3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS).
4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask.

1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win.

llvm-svn: 281215
2016-09-12 14:30:48 +00:00
..
Analysis [Loop Vectorizer] Fixed memory confilict checks. 2016-08-28 08:53:53 +00:00
Assembler DebugInfo: Add flag to CU to disable emission of inline debug info into the skeleton CU 2016-08-24 18:29:49 +00:00
Bindings
Bitcode [Bitcode] Add compatibility test for the 3.9 release 2016-09-09 17:24:31 +00:00
BugPoint
CodeGen [Thumb] Teach ISel how to lower compares of AND bitmasks efficiently 2016-09-12 14:30:48 +00:00
DebugInfo Fixup failing debuginfo test for change in SimplifyCFG. 2016-09-11 09:13:32 +00:00
Demangle Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00
Examples
ExecutionEngine [ORC] Clone module flags metadata into the globals module in the 2016-09-04 17:53:30 +00:00
Feature Revert "Revert "Invariant start/end intrinsics overloaded for address space"" 2016-08-13 23:31:24 +00:00
FileCheck
Instrumentation [asan] Add flag to allow lifetime analysis of problematic allocas 2016-09-10 01:06:11 +00:00
Integer
JitListener
LibDriver
Linker
LTO [LTO] Change addSaveTemps API: do not add dot to the supplied prefix path 2016-08-18 00:12:33 +00:00
MC [Hexagon] Fix disassembler crash after r279255 2016-09-09 21:45:00 +00:00
Object Next set of additional error checks for invalid Mach-O files for bad load commands 2016-08-31 17:57:46 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Other [PM] Introduce basic update capabilities to the new PM's CGSCC pass 2016-08-24 09:37:14 +00:00
SymbolRewriter
TableGen [TableGen] AsmMatcher: Add AsmVariantName to Instruction class. 2016-09-08 15:50:52 +00:00
ThinLTO/X86 Fix ThinLTO crash with debug info 2016-09-03 21:12:33 +00:00
tools [llvm-cov] Move the 'jump to first unexecuted line' link 2016-09-10 19:37:26 +00:00
Transforms [InstCombine] regenerate checks 2016-09-12 00:12:56 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00
lit.cfg Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00
lit.site.cfg.in
TestRunner.sh