Added notes about a x86 isel deficiency.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 27 Jan 2006 22:11:01 +0000 (22:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 27 Jan 2006 22:11:01 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25706 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index cb206f3b04e2c16f0550311ad6f61aaf9d1a2f57..9410a9acf8d287c5e874d5e9ac57ef62e2e24774 100644 (file)
@@ -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.