llvm/test/CodeGen
Benjamin Kramer 9b108a338d Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off.
This happens all the time when a smul is promoted to a larger type.

On x86-64 we now compile "int test(int x) { return x/10; }" into
  movslq  %edi, %rax
  imulq $1717986919, %rax, %rax
  movq  %rax, %rcx
  shrq  $63, %rcx
  sarq  $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax"
  addl  %ecx, %eax

This fires 96 times in gcc.c on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-30 16:38:43 +00:00
..
Alpha If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
ARM Add a testcase for my last checkin. 2011-01-27 06:01:17 +00:00
Blackfin
CBackend
CellSPU Allow sign-extending of i8 and i16 to i128 on SPU. 2011-01-20 15:49:06 +00:00
CPP
Generic fix rdar://8878965, a regression I introduced with the recent 2011-01-18 20:53:04 +00:00
MBlaze Lower the MBlaze target specific calling conventions for "interrupt_handler" 2010-12-15 20:27:28 +00:00
Mips Add support for mips32 madd and msub instructions. Patch by Akira Hatanaka 2011-01-18 19:29:17 +00:00
MSP430 If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
PowerPC Restore the behavior of frame lowering before my refactoring. 2010-12-18 19:53:14 +00:00
PTX ptx: remove reg-reg addressing mode and st.const 2011-01-01 11:58:58 +00:00
SPARC Pass sret arguments through the stack instead of through registers in Sparc backend. It makes the code generated more compliant with the sparc32 ABI. 2011-01-22 13:05:16 +00:00
SystemZ If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
Thumb Sorry, several patches in one. 2011-01-20 08:34:58 +00:00
Thumb2 Last round of fixes for movw + movt global address codegen. 2011-01-21 18:55:51 +00:00
X86 Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off. 2011-01-30 16:38:43 +00:00
XCore Update tests. 2011-01-16 18:02:57 +00:00
thumb2-mul.ll