On Oct 2, 2007, at 8:29 PM, Chris Lattner wrote: >> URL: http://llvm.org/viewvc/llvm-project?rev=42546&view=rev >> Log: >> Another missed optimization. > > Hi Bill, > > Thank you for tracking these down. However, without .ll files or .c > files to reproduce this, they are somewhat useless. In the example > below, if I wanted to work on this, how would I demonstrate the issue?
Ok, nevermind, you fixed this later, thanks! -Chris > -Chris > >> Modified: >> llvm/trunk/lib/Target/X86/README.txt >> >> Modified: llvm/trunk/lib/Target/X86/README.txt >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ >> README.txt?rev=42546&r1=42545&r2=42546&view=diff >> >> ===================================================================== >> = >> ======== >> --- llvm/trunk/lib/Target/X86/README.txt (original) >> +++ llvm/trunk/lib/Target/X86/README.txt Tue Oct 2 15:42:59 2007 >> @@ -1239,3 +1239,31 @@ >> >> // >> ===------------------------------------------------------------------ >> - >> --===// >> >> +The following code: >> + >> +LBB3_5: # bb114.preheader >> + movswl -68(%ebp), %eax >> + movl $32, %ecx >> + movl %ecx, -80(%ebp) >> + subl %eax, -80(%ebp) >> + movswl -52(%ebp), %eax >> + movl %ecx, -84(%ebp) >> + subl %eax, -84(%ebp) >> + movswl -70(%ebp), %eax >> + movl %ecx, -88(%ebp) >> + subl %eax, -88(%ebp) >> + movswl -50(%ebp), %eax >> + subl %eax, %ecx >> + movl %ecx, -76(%ebp) >> + movswl -42(%ebp), %eax >> + movl %eax, -92(%ebp) >> + movswl -66(%ebp), %eax >> + movl %eax, -96(%ebp) >> + movw $0, -98(%ebp) >> + >> +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). >> + >> +// >> ===------------------------------------------------------------------ >> - >> --===// >> + >> >> >> _______________________________________________ >> llvm-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
