1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test
Sanjay Patel 4f4bd24ec4 [x86] try harder to match bitwise 'or' into an LEA
The motivation for this patch starts with the epic fail example in PR18007:
https://llvm.org/bugs/show_bug.cgi?id=18007

...unfortunately, this patch makes no difference for that case, but it solves some
simpler cases. We'll get there some day. :)

The current 'or' matching code was using computeKnownBits() via 
isBaseWithConstantOffset() -> MaskedValueIsZero(), but that's an unnecessarily limited use. 
We can do more by copying the logic in ValueTracking's haveNoCommonBitsSet(), so we can 
treat the 'or' as if it was an 'add'.

There's a TODO comment here because we should lift the bit-checking logic into a helper
function, so it's not duplicated in DAGCombiner.

An example of the better LEA matching:

leal (%rdi,%rdi), %eax
andl $1, %esi
orl %esi, %eax

Becomes:

andl $1, %esi
leal (%rsi,%rdi,2), %eax

Differential Revision: http://reviews.llvm.org/D13956

llvm-svn: 252515
2015-11-09 21:16:49 +00:00
..
Analysis Fix LoopAccessAnalysis when potentially nullptr check are involved 2015-11-05 05:49:43 +00:00
Assembler DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
Bindings Add a new attribute: norecurse 2015-11-06 10:32:53 +00:00
Bitcode Add 'notail' marker for call instructions. 2015-11-06 23:55:38 +00:00
BugPoint [bugpoint] Add a named metadata (+their operands) reducer 2015-11-06 00:12:50 +00:00
CodeGen [x86] try harder to match bitwise 'or' into an LEA 2015-11-09 21:16:49 +00:00
DebugInfo DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
Examples
ExecutionEngine [RuntimeDyld] Add support for R_X86_64_PC8 relocation. 2015-11-08 19:34:17 +00:00
Feature [FunctionAttrs] Add handling for operand bundles 2015-11-07 01:56:00 +00:00
FileCheck
Instrumentation DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
Integer
JitListener DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
LibDriver
Linker Restore "Move metadata linking after lazy global materialization/linking." 2015-11-06 17:50:53 +00:00
LTO Add a new attribute: norecurse 2015-11-06 10:32:53 +00:00
MC [Hexagon] Enabling ASM parsing on Hexagon backend and adding instruction parsing tests. General updating of the code emission. 2015-11-09 04:07:48 +00:00
Object Tests: be slightly more specific to avoid conflict with path. 2015-10-26 13:40:03 +00:00
Other
SymbolRewriter
TableGen
tools [Hexagon] Removing XFAIL on Hexagon target. 2015-11-09 06:15:55 +00:00
Transforms Add discriminators for call instructions that are from the same line and same basic block. 2015-11-09 17:30:38 +00:00
Unit
Verifier DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh