From e826a018b94c72212021517fb91e6ffb30f1b214 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 27 Jan 2006 22:11:01 +0000 Subject: [PATCH] Added notes about a x86 isel deficiency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25706 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/README.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index cb206f3b04e..9410a9acf8d 100644 --- a/lib/Target/X86/README.txt +++ b/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.