llvm-6502/lib
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
..
Analysis Fix comment. 2011-01-29 19:55:23 +00:00
Archive
AsmParser Move unnamed_addr after the function arguments on Sabre's request. 2011-01-25 19:09:56 +00:00
Bitcode
CodeGen 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
CompilerDriver
ExecutionEngine Fix libffi usage when it is on a custom path. 2011-01-28 16:49:05 +00:00
Linker
MC Error on .code16 instead of producing wrong (32bit) code. 2011-01-28 19:29:48 +00:00
Object
Support Support/CommandLine: Fix LookupNearestOption to also search extra option names. 2011-01-24 17:27:17 +00:00
Target 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
Transforms Unbreak the MSVC build. 2011-01-29 20:06:16 +00:00
VMCore Fix 'fcmp one' constant folding. Noticed by inspection. 2011-01-30 01:49:58 +00:00
Makefile