summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-01-27 22:11:01 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-01-27 22:11:01 +0000
commit9857d075b5628aabdb238842617839d539a2df18 (patch)
treeaa8015071a60478a96b3c9e4d1e4f9c6f7984220 /llvm/lib/Target
parent4c251f89b44a3c4d2e9cf1c5693184d266a64d23 (diff)
downloadbcm5719-llvm-9857d075b5628aabdb238842617839d539a2df18.tar.gz
bcm5719-llvm-9857d075b5628aabdb238842617839d539a2df18.zip
Added notes about a x86 isel deficiency.
llvm-svn: 25706
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/README.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index cb206f3b04e..9410a9acf8d 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/lib/Target/X86/README.txt
@@ -166,3 +166,25 @@ http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02011.html
Combine: a = sin(x), b = cos(x) into a,b = sincos(x).
+//===---------------------------------------------------------------------===//
+
+Solve this DAG isel folding deficiency:
+
+int X, Y;
+
+void fn1(void)
+{
+ X = X | (Y << 3);
+}
+
+compiles to
+
+fn1:
+ movl Y, %eax
+ shll $3, %eax
+ orl X, %eax
+ movl %eax, X
+ ret
+
+The problem is the store's chain operand is not the load X but rather
+a TokenFactor of the load X and load Y. This prevents the folding.
OpenPOWER on IntegriCloud