1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 07:22:55 +01:00
llvm-mirror/lib
Chris Lattner 4ba91f5168 Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!!  In practice, a simple loop like this:

no_exit:                ; preds = %no_exit, %entry
        %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ]            ; <uint> [#uses=3]
        %tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0          ; <double*> [#uses=1]
        store double 0.000000e+00, double* %tmp.4
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
        %exitcond = seteq uint %indvar.next, %N         ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

was being code gen'd to:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        shll $4, %esi
        movl $0, 4(%eax,%esi)
        movl $0, (%eax,%esi)
        incl %edx
        movl $0, (%eax,%esi)
        movl $0, 4(%eax,%esi)
        cmpl %ecx, %edx
        jne .LBBtest_1  # no_exit

Note that we are doing 4 32-bit stores instead of 2.  Now we generate:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        incl %esi
        shll $4, %edx
        movl $0, (%eax,%edx)
        movl $0, 4(%eax,%edx)
        cmpl %ecx, %esi
        movl %esi, %edx
        jne .LBBtest_1  # no_exit

This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/

llvm-svn: 20265
2005-02-22 07:23:39 +00:00
..
Analysis Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll 2005-02-17 16:54:16 +00:00
AsmParser Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll 2005-02-01 01:47:42 +00:00
Bytecode Make the check for global variables the same as the one for functions. In 2005-02-13 18:12:20 +00:00
CodeGen Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code. 2005-02-22 07:23:39 +00:00
Debugger Correct the comments and file header. 2004-12-23 21:16:46 +00:00
ExecutionEngine Fix problems running the HowToUseJIT on powerpc, and probably problems with 2005-02-20 18:43:35 +00:00
Linker Add support for ".so" files compiled with LLVM which contain LLVM bytecode. 2005-02-19 18:30:29 +00:00
Support Instead of doing a manual comparison loop, just use memcmp, thanks to JohnC 2005-02-15 22:12:10 +00:00
System Fix silly mistake. 2005-02-20 02:48:51 +00:00
Target no longer build as a shared library 2005-02-22 04:58:26 +00:00
Transforms Do not mark obviously unreachable blocks live when processing PHI nodes, 2005-02-17 19:28:49 +00:00
VMCore Nuke blank line. 2005-02-13 17:54:21 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00