1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test
Evan Cheng 82e8360cf3 LLVM sdisel normalize bit extraction of the form:
((x & 0xff00) >> 8) << 2
to
 (x >> 6) & 0x3fc

This is general goodness since it folds a left shift into the mask. However,
the trailing zeros in the mask prevents the ARM backend from using the bit
extraction instructions. And worse since the mask materialization may require
an addition instruction. This comes up fairly frequently when the result of 
the bit twiddling is used as memory address. e.g.

 = ptr[(x & 0xFF0000) >> 16]

We want to generate:
  ubfx   r3, r1, #16, #8
  ldr.w  r3, [r0, r3, lsl #2]

vs.
  mov.w  r9, #1020
  and.w  r2, r9, r1, lsr #14
  ldr    r2, [r0, r2]

Add a late ARM specific isel optimization to
ARMDAGToDAGISel::PreprocessISelDAG(). It folds the left shift to the
'base + offset' address computation; change the mask to one which doesn't have
trailing zeros and enable the use of ubfx.

Note the optimization has to be done late since it's target specific and we
don't want to change the DAG normalization. It's also fairly restrictive
as shifter operands are not always free. It's only done for lsh 1 / 2. It's
known to be free on some cpus and they are most common for address
computation.

This is a slight win for blowfish, rijndael, etc.

rdar://12870177

llvm-svn: 170581
2012-12-19 20:16:09 +00:00
..
Analysis Reverse order of checking SSE level when calculating compare cost, so we check 2012-12-18 22:57:56 +00:00
Archive
Assembler Fast-math test case for bitcode and textual reading/writing 2012-11-27 00:45:08 +00:00
Bindings/Ocaml Move TargetData to DataLayout. 2012-10-08 16:39:34 +00:00
Bitcode Change encoding of instruction operands in bitcode binaries to be relative 2012-10-11 20:20:40 +00:00
BugPoint Fix unexpected passes. These test do work with LTO on linux. I tested both 2012-10-26 02:19:02 +00:00
CodeGen LLVM sdisel normalize bit extraction of the form: 2012-12-19 20:16:09 +00:00
DebugInfo Add support for passing -main-file-name all the way through to 2012-12-18 00:31:01 +00:00
ExecutionEngine llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: ppc32-elf is not ready. 2012-11-20 10:49:01 +00:00
Feature Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
FileCheck Fix a bug in FileCheck that wouldn't let define variables as follows: 2012-12-02 16:02:41 +00:00
Instrumentation [msan] Heuristically instrument unknown intrinsics. 2012-12-19 11:22:04 +00:00
Integer Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
JitListener Use the 'count' attribute to calculate the upper bound of an array. 2012-12-04 21:34:03 +00:00
Linker Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
MC Remove edis - the enhanced disassembler. Fixes PR14654. 2012-12-19 19:55:47 +00:00
Object Teach MachO which sections contain code 2012-12-17 17:59:32 +00:00
Other Using "not grep" is brittle as the test passes if llvm-as fails. 2012-11-21 14:17:23 +00:00
Scripts Added program header emission 2012-11-16 20:51:32 +00:00
TableGen Fix typo, which prevent test from being check. 2012-12-12 21:10:56 +00:00
tools PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test! 2012-12-05 23:15:33 +00:00
Transforms Transform (x&C)>V into (x&C)!=0 where possible 2012-12-19 19:47:13 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.cfg Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.site.cfg.in Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
Makefile Drop the address space limit for tests in the makefile build. 2012-12-09 10:34:22 +00:00
Makefile.tests
TestRunner.sh