- Mar 08, 2009
-
-
Chris Lattner authored
For 2009-03-07-FPConstSelect.ll we now produce: _f: xorl %eax, %eax testl %edi, %edi movl $4, %ecx cmovne %rax, %rcx leaq LCPI1_0(%rip), %rax movss (%rcx,%rax), %xmm0 ret previously we produced: _f: subl $4, %esp cmpl $0, 8(%esp) movss LCPI1_0, %xmm0 je LBB1_2 ## entry LBB1_1: ## entry movss LCPI1_1, %xmm0 LBB1_2: ## entry movss %xmm0, (%esp) flds (%esp) addl $4, %esp ret on PPC the code also improves to: _f: cntlzw r2, r3 srwi r2, r2, 5 li r3, lo16(LCPI1_0) slwi r2, r2, 2 addis r3, r3, ha16(LCPI1_0) lfsx f1, r3, r2 blr from: _f: li r2, lo16(LCPI1_1) cmplwi cr0, r3, 0 addis r2, r2, ha16(LCPI1_1) beq cr0, LBB1_2 ; entry LBB1_1: ; entry li r2, lo16(LCPI1_0) addis r2, r2, ha16(LCPI1_0) LBB1_2: ; entry lfs f1, 0(r2) blr This also improves the existing pic-cpool case from: foo: subl $12, %esp call .Lllvm$1.$piclabel .Lllvm$1.$piclabel: popl %eax addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax cmpl $0, 16(%esp) movsd .LCPI1_0@GOTOFF(%eax), %xmm0 je .LBB1_2 # entry .LBB1_1: # entry movsd .LCPI1_1@GOTOFF(%eax), %xmm0 .LBB1_2: # entry movsd %xmm0, (%esp) fldl (%esp) addl $12, %esp ret to: foo: call .Lllvm$1.$piclabel .Lllvm$1.$piclabel: popl %eax addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax xorl %ecx, %ecx cmpl $0, 4(%esp) movl $8, %edx cmovne %ecx, %edx fldl .LCPI1_0@GOTOFF(%eax,%edx) ret This triggers a few dozen times in spec FP 2000. llvm-svn: 66358
-
Chris Lattner authored
llvm-svn: 66357
-
- Mar 07, 2009
-
-
Duncan Sands authored
and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
-
- Mar 06, 2009
-
-
Dan Gohman authored
with multiple chain operands. This can occur when the scheduler has added chain operands to a node that already has a chain operand, in order to handle physical register dependencies. This fixes an llvm-gcc bootstrap failure on x86-64 introduced in r66058. llvm-svn: 66240
-
Bill Wendling authored
Delete this default branch, because we're going to generate our own. llvm-svn: 66234
-
- Mar 05, 2009
-
-
Owen Anderson authored
llvm-svn: 66158
-
Owen Anderson authored
Be more careful about choosing restore points when doing restore folding. This fixes some subtle miscompilations. llvm-svn: 66147
-
Evan Cheng authored
Fix how livein live intervals are handled. Previously it could end at MBB start. Sorry, no small test case possible. llvm-svn: 66129
-
- Mar 04, 2009
-
-
Bob Wilson authored
It is an error to call APInt::zext with a size that is equal to the value's current size, so use zextOrTrunc instead. llvm-svn: 66039
-
Owen Anderson authored
Add a restore folder, which shaves a dozen or so machineinstrs off oggenc. Update a testcase to check this. llvm-svn: 66029
-
Eli Friedman authored
llvm-svn: 66021
-
Evan Cheng authored
Fix PR3701. 1. X86 target renamed eflags register to flags. This matches what llvm-gcc generates so codegen knows flags register is being clobbered by inline asm. 2. BURR scheduler should also check if inline asm nodes can clobber "live" physical registers. Previously it was only checking target nodes with implicit defs. llvm-svn: 65996
-
Bill Wendling authored
so it changed it into a 31 via the TLO.ShrinkDemandedConstant() call. Then it would go through the DAG combiner again. This time it had a value of 31, which was turned into a -1 by TLI.SimplifyDemandedBits(). This would ping pong forever. Teach the TLO.ShrinkDemandedConstant() call not to lower a value if the demanded value is an XOR of all ones. llvm-svn: 65985
-
- Mar 03, 2009
-
-
Bob Wilson authored
arbitrary vector sizes. Add an optional MinSplatBits parameter to specify a minimum for the splat element size. Update the PPC target to use the revised interface. llvm-svn: 65899
-
- Mar 02, 2009
-
-
Nate Begeman authored
extracts + build_vector into a shuffle would fail, because the type of the new build_vector would not be legal. Try harder to create a legal build_vector type. Note: this will be totally irrelevant once vector_shuffle no longer takes a build_vector for shuffle mask. New: _foo: xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 subps %xmm1, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, 0 Old: _foo: xorps %xmm0, %xmm0 movss %xmm0, %xmm1 xorps %xmm2, %xmm2 unpcklps %xmm1, %xmm2 pshufd $80, %xmm1, %xmm1 unpcklps %xmm1, %xmm2 pslldq $16, %xmm2 pshufd $57, %xmm2, %xmm1 subps %xmm0, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, 0 llvm-svn: 65791
-
- Mar 01, 2009
-
-
Evan Cheng authored
Look for situations like this: %reg1024<def> = MOV r1 %reg1025<def> = MOV r0 %reg1026<def> = ADD %reg1024, %reg1025 r0 = MOV %reg1026 Commute the ADD to hopefully eliminate an otherwise unavoidable copy. llvm-svn: 65752
-
Bob Wilson authored
method in a BuildVectorSDNode "pseudo-class". llvm-svn: 65747
-
- Feb 28, 2009
-
-
Evan Cheng authored
llvm-svn: 65679
-
- Feb 27, 2009
-
-
Devang Patel authored
It is possible that subprgoram definition is only encoding return value directly, instsad of an DIArray of all argument types. llvm-svn: 65643
-
Rafael Espindola authored
pic | declaration | linkage | visibility | !pic | declaration | external | default | tls1.ll tls2.ll | local exec pic | declaration | external | default | tls1-pic.ll tls2-pic.ll | general dynamic !pic | !declaration | external | default | tls3.ll tls4.ll | initial exec pic | !declaration | external | default | tls3-pic.ll tls4-pic.ll | general dynamic !pic | declaration | external | hidden | tls7.ll tls8.ll | local exec pic | declaration | external | hidden | X | local dynamic !pic | !declaration | external | hidden | tls9.ll tls10.ll | local exec pic | !declaration | external | hidden | X | local dynamic !pic | declaration | internal | default | tls5.ll tls6.ll | local exec pic | declaration | internal | default | X | local dynamic The ones marked with an X have not been implemented since local dynamic is not implemented. llvm-svn: 65632
-
Evan Cheng authored
llvm-svn: 65592
-
- Feb 26, 2009
-
-
Owen Anderson authored
llvm-svn: 65501
-
Evan Cheng authored
llvm-svn: 65498
-
Evan Cheng authored
If an available register falls through to a succ block, unset the last kill. Sorry, it's impossible to reduce a sensible test case. It basically requires the moon and stars to align in order to cause a failure. llvm-svn: 65497
-
- Feb 25, 2009
-
-
Evan Cheng authored
llvm-svn: 65482
-
Dale Johannesen authored
overly long ints, e.g. i96, into pieces at PHIs and the nodes that feed into them; however big-endian reverses the order of the pieces (for some reason), and wasn't doing it the same way on both sides, so the pieces didn't match and runtime failures ensued. Fixes 188.ammp and sqlite3 on ppc32. llvm-svn: 65481
-
Devang Patel authored
Print variable's display name in dwarf DIE. llvm-svn: 65468
-
Evan Cheng authored
Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior. This is a very minor compile time win. llvm-svn: 65438
-
Scott Michel authored
llvm-svn: 65427
-
Scott Michel authored
results via reference parameters. This patch also appears to fix Evan's reported problem supplied as a reduced bugpoint test case. llvm-svn: 65426
-
- Feb 24, 2009
-
-
Bill Wendling authored
them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. llvm-svn: 65379
-
Owen Anderson authored
llvm-svn: 65375
-
Bill Wendling authored
a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
-
Dan Gohman authored
ashr instcombine to help expose this code. And apply the fix to SelectionDAG's copy of this code too. llvm-svn: 65364
-
Devang Patel authored
This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite. llvm-svn: 65357
-
Devang Patel authored
If there is not any debug info available for any global variables and any subprograms then there is not any debug info to emit. llvm-svn: 65352
-
- Feb 23, 2009
-
-
Scott Michel authored
instruction. The class also consolidates the code for detecting constant splats that's shared across PowerPC and the CellSPU backends (and might be useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for generating new BUILD_VECTOR nodes. llvm-svn: 65296
-
- Feb 22, 2009
-
-
Evan Cheng authored
llvm-svn: 65279
-
- Feb 21, 2009
-
-
Richard Pennington authored
llvm-svn: 65239
-
Anton Korobeynikov authored
Now we're using one gross, but quite robust hack :) (previous ones did not work, for example, when ext_weak symbol was used deep inside constant expression in the initializer). The proper fix of this problem will require some quite huge asmprinter changes and that's why was postponed. This fixes PR3629 by the way :) llvm-svn: 65230
-