From 67a1af9709f1b4af653b6c38ab4299d41f8d4380 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Oct 2007 03:40:24 +0000 Subject: [PATCH] Bill's example is still not enough to repro this, but it has other issues that seem significant as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42564 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/README.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 0fd79f23611..39c8a02e313 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1277,6 +1277,14 @@ LBB3_5: # bb114.preheader movl %eax, -96(%ebp) movw $0, -98(%ebp) +This appears to be bad because the RA is not folding the store to the stack +slot into the movl. The above instructions could be: + movl $32, -80(%ebp) +... + movl $32, -84(%ebp) +... +This seems like a cross between remat and spill folding. + This has redundant subtractions of %eax from a stack slot. However, %ecx doesn't change, so we could simply subtract %eax from %ecx first and then use %ecx (or vice-versa).