aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Don't constant propagate byval pointers, since they are not really pointers, butTorok Edwin2009-09-241-0/+24
| | | | | | | | rather structs passed by value. This fixes PR5038. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82689 91177308-0d34-0410-b5e6-96231b3b80d8
* Add count/not tools as executables.Daniel Dunbar2009-09-242-29/+0
| | | | | | - Apparently, I'm willing to do incredibly stupid things in the name of portability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82685 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5024 with a big hammer: disable the double-def assertion in the scavenger.Evan Cheng2009-09-241-0/+21
| | | | | | | | | | | | | | | | | | | | | | | LiveVariables add implicit kills to correctly track partial register kills. This works well enough and is fairly accurate. But coalescer can make it impossible to maintain these markers. e.g. BL <ga:sss1>, %R0<kill,undef>, %S0<kill>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def>, ... ... %reg1031<def> = FLDS <cp#1>, 0, 14, %reg0, Mem:LD4[ConstantPool] ... %S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill> When reg1031 and S0 are coalesced, the copy (FCPYS) will be eliminated the the implicit-kill of D0 is lost. In this case it's possible to move the marker to the FLDS. But in many cases, this is not possible. Suppose %reg1031<def> = FOO <cp#1>, %D0<imp-def> ... %S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill> When FCPYS goes away, the definition of S0 is the "FOO" instruction. However, transferring the D0 implicit-kill to FOO doesn't work since it is the def of D0 itself. We need to fix this in another time by introducing a "kill" pseudo instruction to track liveness. Disabling the assertion is not ideal, but machine verifier is doing that job now. It's important to know double-def is not a miscomputation since it means a register should be free but it's not tracked as free. It's a performance issue instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82677 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up LiveVariables and change how it deals with partial updates and ↵Evan Cheng2009-09-242-1/+92
| | | | | | kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82676 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable test; what it's testing for is wrong.Dale Johannesen2009-09-231-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82658 91177308-0d34-0410-b5e6-96231b3b80d8
* Add nounwind.Evan Cheng2009-09-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82637 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5024. LiveVariables physical register defs should *commit* only after allEvan Cheng2009-09-231-0/+23
| | | | | | | | | of the defs are processed. Also fix a implicit_def propagation bug: a implicit_def of a physical register should be applied to uses of the sub-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82616 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a obvious logic error.Evan Cheng2009-09-231-0/+124
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82610 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5024. LiveVariables::FindLastPartialDef should return a set of ↵Evan Cheng2009-09-221-0/+14
| | | | | | sub-registers that were defined by the last partial def, not just a single sub-register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82535 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for running LLVM tests from cmake.Daniel Dunbar2009-09-222-0/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82534 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate lit.site.cfg from a .in file, as clang does.Daniel Dunbar2009-09-222-8/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82533 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pasto. Also simplify for Bill's benefit.Evan Cheng2009-09-222-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82505 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5023: The instruction form of DominatorTree::dominates did not Chris Lattner2009-09-211-0/+24
| | | | | | | | | | | take into consideration that the result of an invoke is only valid in the normal dest, not the unwind dest. This caused 'PHINode::hasConstantValue' to return true in an invalid situation, causing mem2reg to delete a phi that was actually needed. This caused a crash building 483.xalancbmk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82491 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up spill weight computation. Also some changes to give loop inductionEvan Cheng2009-09-217-8/+44
| | | | | | | | | | | variable increment / decrement slighter high priority. This has major impact on some micro-benchmarks. On MultiSource/Applications and spec tests, it's a minor win. It also reduce 256.bzip instruction count by 8%, 55 on 164.gzip on i386 / Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82485 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment mentioning the rdar number associated with this test.Dan Gohman2009-09-211-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82471 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for rematerializing FsFLD0SS and FsFLD0SD as constant-poolDan Gohman2009-09-211-0/+95
| | | | | | | loads in order to reduce register pressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82470 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize SSE min and max opportunities in even more cases.Dan Gohman2009-09-212-4/+323
| | | | | | | | | | | And fix a bug with the behavior of min/max instructions formed from fcmp uge comparisons. Also, use FiniteOnlyFPMath() for this code instead of UnsafeFPMath, as it is more specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82466 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5016, a crash I introduced in GVN handing first classChris Lattner2009-09-211-0/+14
| | | | | | | arrays and structs, which cannot be bitcast to integers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82460 91177308-0d34-0410-b5e6-96231b3b80d8
* enable non-local analysis and PRE of large store -> little load.Chris Lattner2009-09-211-1/+51
| | | | | | | | This doesn't kick in too much because of phi translation issues, but this can be resolved in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82447 91177308-0d34-0410-b5e6-96231b3b80d8
* add pr#Chris Lattner2009-09-211-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82440 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve GVN to be able to forward substitute a small load Chris Lattner2009-09-211-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from a piece of a large store when both are in the same block. This allows clang to compile the testcase in PR4216 to this code: _test_bitfield: movl 4(%esp), %eax movl %eax, %ecx andl $-65536, %ecx orl $32962, %eax andl $40186, %eax orl %ecx, %eax ret This is not ideal, but is a whole lot better than the code produced by llvm-gcc: _test_bitfield: movw $-32574, %ax orw 4(%esp), %ax andw $-25350, %ax movw %ax, 4(%esp) movw 7(%esp), %cx shlw $8, %cx movzbl 6(%esp), %edx orw %cx, %dx movzwl %dx, %ecx shll $16, %ecx movzwl %ax, %eax orl %ecx, %eax ret and dramatically better than that produced by gcc 4.2: _test_bitfield: pushl %ebx call L3 "L00000000001$pb": L3: popl %ebx movl 8(%esp), %eax leal 0(,%eax,4), %edx sarb $7, %dl movl %eax, %ecx andl $7168, %ecx andl $-7201, %ebx movzbl %dl, %edx andl $1, %edx sall $5, %edx orl %ecx, %ebx orl %edx, %ebx andl $24, %eax andl $-58336, %ebx orl %eax, %ebx orl $32962, %ebx movl %ebx, %eax popl %ebx ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82439 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4986. "r1024 = insert_subreg r1024, undef, 2" cannot be turned in an ↵Evan Cheng2009-09-211-0/+34
| | | | | | implicit_def. Instead, it's an identity copy so it should be eliminated. Also make sure to update livevariable kill information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82436 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a FileCheck bug where:Chris Lattner2009-09-211-1/+0
| | | | | | | | | | | ; CHECK: foo ; CHECK-NOT: foo ; CHECK: bar would always fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82424 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ARM and X86 specific AsmParser tests into separate subdirectories, and onlyDaniel Dunbar2009-09-217-3/+11
| | | | | | run if appropriate target is supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82419 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around a FileCheck bug, for now.Daniel Dunbar2009-09-201-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82416 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r82404, it is causing a bootstrap miscompile. This is very very Chris Lattner2009-09-201-26/+0
| | | | | | | scary, as it indicates a lurking bug. yay. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82411 91177308-0d34-0410-b5e6-96231b3b80d8
* this was not supposed to be committedChris Lattner2009-09-201-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82409 91177308-0d34-0410-b5e6-96231b3b80d8
* implement and document support for CHECK-NOTChris Lattner2009-09-201-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82408 91177308-0d34-0410-b5e6-96231b3b80d8
* improve memdep to eliminate bitcasts (and aliases, and noop geps) Chris Lattner2009-09-201-0/+26
| | | | | | | | early for the stated reasons: this allows it to find more equivalences and depend less on code layout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82404 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CoerceAvailableValueToLoadType earlier in GVN.cpp. Hook it upChris Lattner2009-09-201-3/+51
| | | | | | | | | so that nonlocal and partially redundant loads can use it as well. The testcase shows examples of craziness this can handle. This triggers *many* times in 176.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82403 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach 'make check-all' to build the site configuration for clang, if it is ↵Daniel Dunbar2009-09-201-5/+15
| | | | | | in tree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82400 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance GVN to forward substitute a stored value to a loadChris Lattner2009-09-201-0/+119
| | | | | | | | | (and load -> load) when the base pointers must alias but when they are different types. This occurs very very frequently in 176.gcc and other code that uses bitfields a lot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82399 91177308-0d34-0410-b5e6-96231b3b80d8
* Peer through zext and sext to eliminate them when it is safe to do so.Nick Lewycky2009-09-201-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82389 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold 'icmp eq (icmp), true' into an xor(icmp).Nick Lewycky2009-09-201-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82386 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an intel syntax MCInstPrinter implementation. You can nowChris Lattner2009-09-201-0/+1
| | | | | | | | transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82385 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite this check so that it checks what it's supposed to and doesn't useNick Lewycky2009-09-201-27/+20
| | | | | | | CHECK-NOT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82383 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the constant folder how to not a cmpinst.Nick Lewycky2009-09-201-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82378 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'make check-all', which runs the LLVM tests along with the clang tests ifDaniel Dunbar2009-09-201-0/+17
| | | | | | its in the standard location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82374 91177308-0d34-0410-b5e6-96231b3b80d8
* Try turning icmp(bitcast(x), bitcast(y)) into icmp(bitcast(bitcast(x)), y) inNick Lewycky2009-09-201-0/+5
| | | | | | | the hopes that the two bitcasts will merge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82371 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the usage of evaluateICmpRelation's return value.Nick Lewycky2009-09-201-0/+1
| | | | | | | | Add another line to the ConstantExprFold test to demonstrate the GEPs may not wrap around in either the signed or unsigned senses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82361 91177308-0d34-0410-b5e6-96231b3b80d8
* When computing live intervals for earlyclobber operands,Dale Johannesen2009-09-201-0/+15
| | | | | | | | | | | | we pushed the beginning of the interval back 1, so the interval would overlap with inputs that die. We were also pushing the end of the interval back 1, though, which means the earlyclobber didn't overlap with other output operands. Don't do this. PR 4964. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82342 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the constant folder how to handle a few simple i1 cases.Nick Lewycky2009-09-201-0/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82340 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic ↵Evan Cheng2009-09-191-0/+30
| | | | | | blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82311 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete the label names from this test to make it less fragile.Dan Gohman2009-09-181-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82276 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a new X8632_MachoTargetObjectFile TLOF implementation whose Chris Lattner2009-09-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | getSymbolForDwarfGlobalReference is smart enough to know that it needs to register the stub it references with MachineModuleInfoMachO, so that it gets emitted at the end of the file. Move stub emission from X86ATTAsmPrinter::doFinalization to the new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook. The important thing here is that EmitEndOfAsmFile is called *after* the ehframes are emitted, so we get all the stubs. This allows us to remove a gross hack from the asmprinter where it would "just know" that it needed to output stubs for personality functions. Now this is all driven from a consistent interface. The testcase change is just reordering the expected output now that the stubs come out after the ehframe instead of before. This also unblocks other changes that Bill wants to make. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82269 91177308-0d34-0410-b5e6-96231b3b80d8
* Model the carry bit on ppc32. Without this we couldDale Johannesen2009-09-181-0/+62
| | | | | | | | | move a SUBFC (etc.) below the SUBFE (etc.) that consumed the carry bit. Add missing ADDIC8, noticed along the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82266 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for using the FLAGS result of or, xor, and and instructionsDan Gohman2009-09-183-4/+91
| | | | | | | | on x86, to avoid explicit test instructions. A few existing tests changed due to arbitrary register allocation differences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82263 91177308-0d34-0410-b5e6-96231b3b80d8
* Write and read metadata attachments.Devang Patel2009-09-181-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow symbols to start from the digit if target requests it. This allows, ↵Anton Korobeynikov2009-09-181-0/+22
| | | | | | | | | e.g. pinning variables to specified absolute address. Make use of this feature for MSP430. This unbreaks PR4776. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82227 91177308-0d34-0410-b5e6-96231b3b80d8
* make this testcase check darwin32 alsoChris Lattner2009-09-171-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82182 91177308-0d34-0410-b5e6-96231b3b80d8