summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-18 07:47:48 +0000
committerChris Lattner <sabre@nondot.org>2011-01-18 07:47:48 +0000
commit908d8e82b5cc19d1a0a55a5fbc9dfd87359d726e (patch)
tree597a69542e25926f1dbeed4fb0ca87697a2c51e7 /lib/Target/README.txt
parent899407533ac26ff0ff827631bd5164b67548272f (diff)
downloadllvm-908d8e82b5cc19d1a0a55a5fbc9dfd87359d726e.tar.gz
llvm-908d8e82b5cc19d1a0a55a5fbc9dfd87359d726e.tar.bz2
llvm-908d8e82b5cc19d1a0a55a5fbc9dfd87359d726e.tar.xz
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r--lib/Target/README.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 6c8187cdbf..67aec852fa 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -2295,3 +2295,23 @@ avoids partial register stalls in some important cases.
//===---------------------------------------------------------------------===//
+We miss an optzn when lowering divide by some constants. For example:
+ int test(int x) { return x/10; }
+
+We produce:
+
+_test: ## @test
+## BB#0: ## %entry
+ movslq %edi, %rax
+ imulq $1717986919, %rax, %rax ## imm = 0x66666667
+ movq %rax, %rcx
+ shrq $63, %rcx
+** shrq $32, %rax
+** sarl $2, %eax
+ addl %ecx, %eax
+ ret
+
+The two starred instructions could be replaced with a "sarl $34, %rax". This
+occurs in 186.crafty very frequently.
+
+//===---------------------------------------------------------------------===//