aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-20 01:07:33 +0000
committerDan Gohman <gohman@apple.com>2009-01-20 01:07:33 +0000
commita340102f2e0086033f0ef5456a278f81d8937166 (patch)
treeac3737e3127716167f28918d2830830acb498d45 /lib
parent50187c2d138fe3f002e0a8c8f6c7c92939684ff5 (diff)
downloadexternal_llvm-a340102f2e0086033f0ef5456a278f81d8937166.zip
external_llvm-a340102f2e0086033f0ef5456a278f81d8937166.tar.gz
external_llvm-a340102f2e0086033f0ef5456a278f81d8937166.tar.bz2
Add a README entry noticed while investigating PR3216.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/README.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 4e46686..756f38a 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -1651,3 +1651,25 @@ globalopt to remove the "stored only" global.
//===---------------------------------------------------------------------===//
+This code:
+
+define inreg i32 @foo(i8* inreg %p) nounwind {
+ %tmp0 = load i8* %p
+ %tmp1 = ashr i8 %tmp0, 5
+ %tmp2 = sext i8 %tmp1 to i32
+ ret i32 %tmp2
+}
+
+could be dagcombine'd to a sign-extending load with a shift.
+For example, on x86 this currently gets this:
+
+ movb (%eax), %al
+ sarb $5, %al
+ movsbl %al, %eax
+
+while it could get this:
+
+ movsbl (%eax), %eax
+ sarl $5, %eax
+
+//===---------------------------------------------------------------------===//