aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Enable -coalescer-commute-instrs by default.Evan Cheng2008-02-263-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47623 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid aborting on invalid shift counts.Dan Gohman2008-02-261-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47612 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for pr2093: direct operands aren't necessarily addresses, so don't Eli Friedman2008-02-261-0/+17
| | | | | | | | try to simplify them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47610 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2096, a regression introduced with my patch last night. ThisChris Lattner2008-02-261-0/+50
| | | | | | | also fixes cfrac, flops, and 175.vpr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47605 91177308-0d34-0410-b5e6-96231b3b80d8
* Really feed llvm-as with the testcase, do not let it read from stdin. This ↵Gabor Greif2008-02-261-1/+1
| | | | | | fixes the hangs seen on solaris10. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47604 91177308-0d34-0410-b5e6-96231b3b80d8
* This is possible:Evan Cheng2008-02-261-0/+55
| | | | | | | | | | vr1 = extract_subreg vr2, 3 ... vr3 = extract_subreg vr1, 2 The end result is vr3 is equal to vr2 with subidx 2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47592 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix isNegatibleForFree to not return true for ConstantFP nodes Chris Lattner2008-02-261-0/+14
| | | | | | | | | | after legalize. Just because a constant is legal (e.g. 0.0 in SSE) doesn't mean that its negated value is legal (-0.0). We could make this stronger by checking to see if the negated constant is actually legal post negation, but it doesn't seem like a big deal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47591 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2076. CodeGenPrepare now sinks address computation for inline asm memoryEvan Cheng2008-02-261-0/+33
| | | | | | | operands into inline asm block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47589 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge current work back to tree to minimize diffs and drift. Major highlightsScott Michel2008-02-231-3/+2
| | | | | | | | | | | | | | | for CellSPU modifications: - SPUInstrInfo.td refactoring: "multiclass" really is _your_ friend. - Other improvements based on refactoring effort in SPUISelLowering.cpp, esp. in SPUISelLowering::PerformDAGCombine(), where zero amount shifts and rotates are now eliminiated, other scalar-to-vector-to-scalar silliness is also eliminated. - 64-bit operations are being implemented, _muldi3.c gcc runtime now compiles and generates the right code. More work still needs to be done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47532 91177308-0d34-0410-b5e6-96231b3b80d8
* Rematerialization logic was overly conservative when it comes to loads from ↵Evan Cheng2008-02-231-0/+49
| | | | | | fixed stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47529 91177308-0d34-0410-b5e6-96231b3b80d8
* Update test.Evan Cheng2008-02-231-11/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47527 91177308-0d34-0410-b5e6-96231b3b80d8
* Remat of pic loads are now on by default.Evan Cheng2008-02-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47525 91177308-0d34-0410-b5e6-96231b3b80d8
* Really. Why doesn't every arch support MMX?Evan Cheng2008-02-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47513 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for PR2082.Evan Cheng2008-02-221-0/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47501 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow re-materialization of pic load (controlled by -remat-pic-load for now).Evan Cheng2008-02-221-0/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47476 91177308-0d34-0410-b5e6-96231b3b80d8
* copy mmx values from/to memory with GPRs on x86-32 Chris Lattner2008-02-221-2/+3
| | | | | | | | | instead of with mmx registers. This horribleness is apparently done by gcc to avoid having to insert emms in places that really should have it. This is the second half of rdar://5741668. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47474 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using GPR's to copy around mmx value instead of mmx regs.Chris Lattner2008-02-221-0/+14
| | | | | | | | | | | GCC apparently does this, and code depends on not having to do emms when this happens. This is x86-64 only so far, second half should handle x86-32. rdar://5741668 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47470 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat clobber operands like early clobbers: if we haveChris Lattner2008-02-211-2/+11
| | | | | | | | | | any, we force sdisel to do all regalloc for an asm. This leads to gross but correct codegen. This fixes the rest of PR2078. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47454 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-02-2190-1460/+1482
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47432 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase for PR1133Chris Lattner2008-02-211-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a (harmless) but where vregs were added to the used reg lists for Chris Lattner2008-02-211-0/+15
| | | | | | | | | | | | inline asms. Fix PR2078 by marking aliases of registers used when a register is marked used. This prevents EAX from being allocated when AX is listed in the clobber set for the asm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47426 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL this for now.Evan Cheng2008-02-201-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47355 91177308-0d34-0410-b5e6-96231b3b80d8
* this test requires sse2Chris Lattner2008-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47331 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't fold and's into test instructions if they have multiple uses.Chris Lattner2008-02-191-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | This compiles test-nofold.ll into: _test: movl $15, %ecx andl 4(%esp), %ecx testl %ecx, %ecx movl $42, %eax cmove %ecx, %eax ret instead of: _test: movl 4(%esp), %eax movl %eax, %ecx andl $15, %ecx testl $15, %eax movl $42, %eax cmove %ecx, %eax ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47330 91177308-0d34-0410-b5e6-96231b3b80d8
* rename tests to avoid a test- prefix when they aren't related to the test ↵Chris Lattner2008-02-1910-0/+0
| | | | | | instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47329 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-02-1951-1306/+1302
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47325 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't spew stats to stderr.Nick Lewycky2008-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47308 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up the run line for this new test.Nick Lewycky2008-02-191-1/+1
| | | | | | | llc: for the -info-output-file option: requires a value! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47306 91177308-0d34-0410-b5e6-96231b3b80d8
* New test.Evan Cheng2008-02-191-0/+219
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47302 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-02-19162-3373/+3173
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47296 91177308-0d34-0410-b5e6-96231b3b80d8
* - When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should ↵Evan Cheng2008-02-181-0/+17
| | | | | | | | | check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type. - X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47290 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't mark scalar integer multiplication as Expand on x86, since x86Dan Gohman2008-02-181-0/+8
| | | | | | | | | | | | | | has plain one-result scalar integer multiplication instructions. This avoids expanding such instructions into MUL_LOHI sequences that must be special-cased at isel time, and avoids the problem with that code that provented memory operands from being folded. This fixes PR1874, addressesing the most common case. The uncommon cases of optimizing multiply-high operations will require work in DAGCombiner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47277 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade.Tanya Lattner2008-02-1750-906/+906
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47238 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm.memory.barrier, and impl for x86 and alphaAndrew Lenharth2008-02-166-0/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47204 91177308-0d34-0410-b5e6-96231b3b80d8
* This test is not interesting.Evan Cheng2008-02-151-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47189 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a miscompilation from Dan's recent apintification.Chris Lattner2008-02-141-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47128 91177308-0d34-0410-b5e6-96231b3b80d8
* This readme entry is done, testcase here: CodeGen/X86/zero-remat.llChris Lattner2008-02-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47106 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test.Evan Cheng2008-02-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47102 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LegalizeTypes how to expand and promote CTLZ,Duncan Sands2008-02-131-12/+11
| | | | | | | | | | | | | | | | | | | CTTZ and CTPOP. The expansion code differs from that in LegalizeDAG in that it chooses to take the CTLZ/CTTZ count from the Hi/Lo part depending on whether the Hi/Lo value is zero, not on whether CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the width of the type is) for it. I made this change because the optimizers may well know that Hi/Lo is zero and exploit it. The promotion code for CTTZ also differs from that in LegalizeDAG: it uses an "or" to get the right result when the original value is zero, rather than using a compare and select. This also means the value doesn't need to be zero extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47075 91177308-0d34-0410-b5e6-96231b3b80d8
* In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower thisChris Lattner2008-02-131-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | node as soon as we create it in SDISel. Previously we would lower it in legalize. The problem with this is that it only exposes the argument loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2 can hack on them. This causes us to miss some optimizations because datatype expansion also happens here. Exposing the loads early allows us to do optimizations on them. For example we now compile arg-cast.ll to: _foo: movl $2147483647, %eax andl 8(%esp), %eax ret where we previously produced: _foo: subl $12, %esp movsd 16(%esp), %xmm0 movsd %xmm0, (%esp) movl $2147483647, %eax andl 4(%esp), %eax addl $12, %esp ret It might also make sense to do this for ISD::CALL nodes, which have implicit stores on many targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add testcase for recent legalizer changeNate Begeman2008-02-131-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47049 91177308-0d34-0410-b5e6-96231b3b80d8
* New tests.Evan Cheng2008-02-133-0/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47047 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't mask the isel bug.Evan Cheng2008-02-123-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47018 91177308-0d34-0410-b5e6-96231b3b80d8
* This test assumes no SSE4.1.Evan Cheng2008-02-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47017 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some test cases.Evan Cheng2008-02-123-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46998 91177308-0d34-0410-b5e6-96231b3b80d8
* Determine whether a spill kills the register it's spilling before insertion ↵Evan Cheng2008-02-111-0/+10
| | | | | | rather than trying to undo the kill marker afterwards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46953 91177308-0d34-0410-b5e6-96231b3b80d8
* Alignment of struct containing vectors depends onDale Johannesen2008-02-091-1/+1
| | | | | | | | | whether SSE is present, on Darwin anyway. Make it explicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46909 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not always safe to fold movsd into xorpd, etc. Check the alignment of ↵Evan Cheng2008-02-081-0/+99
| | | | | | the load address first to make sure it's 16 byte aligned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46893 91177308-0d34-0410-b5e6-96231b3b80d8
* Added missing entries in X86 load / store folding tables.Evan Cheng2008-02-081-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46866 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a x86-64 codegen deficiency. Allow gv + offset when using rip addressing ↵Evan Cheng2008-02-072-33/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode. Before: _main: subq $8, %rsp leaq _X(%rip), %rax movsd 8(%rax), %xmm1 movss _X(%rip), %xmm0 call _t xorl %ecx, %ecx movl %ecx, %eax addq $8, %rsp ret Now: _main: subq $8, %rsp movsd _X+8(%rip), %xmm1 movss _X(%rip), %xmm0 call _t xorl %ecx, %ecx movl %ecx, %eax addq $8, %rsp ret Notice there is another idiotic codegen issue that needs to be fixed asap: xorl %ecx, %ecx movl %ecx, %eax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46850 91177308-0d34-0410-b5e6-96231b3b80d8