LLVM backend for 6502
Go to file
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
autoconf
bindings
cmake Don't show -pedantic, -W and -Wall on the output of 2011-01-27 19:29:48 +00:00
docs Most browsers eliminate whitespace between anchor tags. Force whitespace with 2011-01-29 01:09:53 +00:00
examples
include This is #included by .c files. Remove C++-style comments. 2011-01-29 21:54:26 +00:00
lib 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
projects
runtime Implementation of path profiling. 2011-01-29 01:09:53 +00:00
test 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
tools Don't show -pedantic, -W and -Wall on the output of 2011-01-27 19:29:48 +00:00
unittests Don't infinitely recurse! Patch by Marius Wachtler! 2011-01-27 07:35:27 +00:00
utils Fix a comment typo. 2011-01-27 23:08:52 +00:00
website
.gitignore
build-for-llvm-top.sh
CMakeLists.txt Handles libffi on the CMake build. 2011-01-21 15:42:54 +00:00
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
ModuleInfo.txt
README.txt

\Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.