aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86
Commit message (Collapse)AuthorAgeFilesLines
* Test from Dhrystone to make sure that we're not emitting an aligned load for aBill Wendling2009-11-191-0/+28
| | | | | | | string that's aligned at 8-bytes instead of 16-bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89295 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5300.Jakob Stoklund Olesen2009-11-181-0/+29
| | | | | | | | When TwoAddressInstructionPass deletes a dead instruction, make sure that all register kills are accounted for. The 2-addr register does not get special treatment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89246 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix inverted test and add testcase from failing self-host.Jakob Stoklund Olesen2009-11-181-0/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89167 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove fragile test.Jakob Stoklund Olesen2009-11-171-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89150 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -split-phi-edges by default, except when -regalloc=local.Jakob Stoklund Olesen2009-11-172-1/+2
| | | | | | | The local register allocator doesn't like it when LiveVariables is run. We should also disable edge splitting under -O0, but that has to wait a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89125 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 89021. It's miscompiling llvm-gcc driver driver at -O0.Evan Cheng2009-11-172-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89082 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -split-phi-edges by defaultJakob Stoklund Olesen2009-11-172-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89021 91177308-0d34-0410-b5e6-96231b3b80d8
* MOV64rm should be marked isReMaterializable.Evan Cheng2009-11-171-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89019 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test - there don't appear to be any actual Reload ReusesDan Gohman2009-11-161-1/+0
| | | | | | | in this testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88998 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r87049, which was the workaround for the regression triggeredDan Gohman2009-11-161-2/+2
| | | | | | | | by the recent FixedStackPseudoSourceValue-related changes, now that the specific bug that affected it is fixed, in r88954. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88997 91177308-0d34-0410-b5e6-96231b3b80d8
* - Check memoperand alignment instead of checking stack alignment. Most load ↵Evan Cheng2009-11-161-0/+28
| | | | | | | | | / store folding instructions are not referencing spill stack slots. - Mark MOVUPSrm re-materializable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88974 91177308-0d34-0410-b5e6-96231b3b80d8
* Support spill comments.David Greene2009-11-161-0/+105
| | | | | | | | | Have the asm printer emit a comment if an instruction is a spill or reload and have the spiller mark copies it introdues so the asm printer can also annotate those. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88911 91177308-0d34-0410-b5e6-96231b3b80d8
* Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to ↵Evan Cheng2009-11-141-0/+133
| | | | | | replace broken code in VirtRegRewriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88753 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the tail call optimization when the caller returns undef.Dan Gohman2009-11-141-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88737 91177308-0d34-0410-b5e6-96231b3b80d8
* When optimizing for size, don't tail-merge unless it's likely to be aDan Gohman2009-11-131-0/+113
| | | | | | | | | | | code-size win, and not when it's only likely to be code-size neutral, such as when only a single instruction would be eliminated and a new branch would be required. This fixes rdar://7392894. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88692 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't let a noalias difference disrupt the tailcall optimization.Dan Gohman2009-11-131-1/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88672 91177308-0d34-0410-b5e6-96231b3b80d8
* Update test.Daniel Dunbar2009-11-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87049 91177308-0d34-0410-b5e6-96231b3b80d8
* Tail merge at any size when there are two potentials blocks and oneDan Gohman2009-11-121-0/+27
| | | | | | | can be made to fall through into the other. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86909 91177308-0d34-0410-b5e6-96231b3b80d8
* x86 users can now return arbitrary sized structs. Structs too large to fit ↵Kenneth Uildriks2009-11-111-0/+17
| | | | | | in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86876 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for tail duplication to BranchFolding, and extendDan Gohman2009-11-112-5/+273
| | | | | | | | | | | | tail merging support to handle more cases. - Recognize several cases where tail merging is beneficial even when the tail size is smaller than the generic threshold. - Make use of MachineInstrDesc::isBarrier to help detect non-fallthrough blocks. - Check for and avoid disrupting fall-through edges in more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86871 91177308-0d34-0410-b5e6-96231b3b80d8
* Add nounwind.Evan Cheng2009-11-114-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86814 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test to work on every platform.Bill Wendling2009-11-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86785 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that the exception handling data has the same visibility as theBill Wendling2009-11-111-0/+30
| | | | | | | function it's generated for. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86779 91177308-0d34-0410-b5e6-96231b3b80d8
* Add testcase for recent checkin.Mike Stump2009-11-091-0/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86620 91177308-0d34-0410-b5e6-96231b3b80d8
* x86 vector shuffle cleanup/fixes:Nate Begeman2009-11-071-1/+1
| | | | | | | | | 1. rename the movhp patfrag to movlhps, since thats what it actually matches 2. eliminate the bogus movhps load and store patterns, they were incorrect. The load transforms are already handled (correctly) by shufps/unpack. 3. revert a recent test change to its correct form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86415 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of shuffle patterns to use movhlps insteadEric Christopher2009-11-072-3/+4
| | | | | | | | of movhps as the constraint. Changes optimizations so update testcases as appropriate as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86360 91177308-0d34-0410-b5e6-96231b3b80d8
* merge cmp1 into cmp0 and filecheckize.Chris Lattner2009-11-072-9/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86345 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5315, original patch by Nicolas Capens!Eric Christopher2009-11-064-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86203 91177308-0d34-0410-b5e6-96231b3b80d8
* RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,Evan Cheng2009-11-041-0/+15
| | | | | | | | | and extract_subreg as a "copy" that defines a valno. Also fixes a typo. These two issues prevent a simple subreg coalescing from happening before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86022 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 85799. It turns out my code isn't buggy.Evan Cheng2009-11-031-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85947 91177308-0d34-0410-b5e6-96231b3b80d8
* Make opt default to not adding a target data string and update tests that ↵Kenneth Uildriks2009-11-031-0/+1
| | | | | | depend on target data to supply it within the test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 85799 for now. It might be breaking llvm-gcc driver.Evan Cheng2009-11-021-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85827 91177308-0d34-0410-b5e6-96231b3b80d8
* Initilize the machine LICM CSE map upon the first time an instruction is ↵Evan Cheng2009-11-021-3/+5
| | | | | | | | | | | hoisted to the loop preheader. Add instructions which are already in the preheader block that may be common expressions of those that are hoisted out. These does get a few more instructions CSE'ed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85799 91177308-0d34-0410-b5e6-96231b3b80d8
* improve x86 codegen support for blockaddress. We now compileChris Lattner2009-11-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | the testcase into: _test1: ## @test1 ## BB#0: ## %entry leaq L_test1_bb6(%rip), %rax jmpq *%rax L_test1_bb: ## Address Taken LBB1_1: ## %bb movb $1, %al ret L_test1_bb6: ## Address Taken LBB1_2: ## %bb6 movb $2, %al ret Note, it is very very strange that BlockAddressSDNode doesn't carry around TargetFlags. Dan, please fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85703 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a target triple so that this test behaves consistently across hosts.Dan Gohman2009-10-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85640 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the -mattr line for this test so that it passes on hosts that lack SSSE3.Dan Gohman2009-10-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85637 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MachineLICM to use the correct virtual register class whenDan Gohman2009-10-301-0/+26
| | | | | | | | | | | unfolding loads for hoisting. getOpcodeAfterMemoryUnfold returns the opcode of the original operation without the load, not the load itself, MachineLICM needs to know the operand index in order to get the correct register class. Extend getOpcodeAfterMemoryUnfold to return this information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85622 91177308-0d34-0410-b5e6-96231b3b80d8
* I forgot to commit this test.Evan Cheng2009-10-301-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85608 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement BranchFolding change to avoid tail merging for a 1 instructionBob Wilson2009-10-283-3/+3
| | | | | | | | common tail, except when the OptimizeForSize function attribute is present. Radar 7338114. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85441 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach MachineLICM to unfold loads from constant memory fromDan Gohman2009-10-282-0/+70
| | | | | | | | otherwise unhoistable instructions in order to allow the loads to be hoisted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85364 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark dead physregdefs dead immediately. This helps MachineSink andDan Gohman2009-10-281-0/+15
| | | | | | | MachineLICM and other things which run before LiveVariables is run. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85360 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow constants of different types to share constant pool entriesDan Gohman2009-10-281-0/+19
| | | | | | | if they have compatible encodings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85359 91177308-0d34-0410-b5e6-96231b3b80d8
* Break anti-dependence breaking out into its own class.David Goodwin2009-10-261-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85127 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LSR's OptimizeShadowIV ignore induction variables with negativeDan Gohman2009-10-261-0/+25
| | | | | | | | | | | strides for now, because it doesn't handle them correctly. This fixes a miscompile of SingleSource/Benchmarks/Misc-C++/ray. This problem was usually hidden because indvars transforms such induction variables into negations of canonical induction variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85118 91177308-0d34-0410-b5e6-96231b3b80d8
* - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests andEvan Cheng2009-10-261-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg around. - Relax register scavenging to allow use of partially "not-live" registers. It's common for targets to operate on registers where the top bits are undef. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... = d0 When the insert_subreg is eliminated by the coalescer, the scavenger used to complain. The previous fix was to keep to insert_subreg around. But that's brittle and it's overly conservative when we want to use the scavenger to allocate registers. It's actually legal and desirable for other instructions to use the "undef" part of d0. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... s1 = = s1 = d0 We probably need add a "partial-undef" marker on machine operand so the machine verifier would not complain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85091 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5295 where the .ll parser didn't reject a function after a globalChris Lattner2009-10-251-1/+1
| | | | | | | | or global after a function with conflicting names. Update some testcases that were accidentally depending on this behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85081 91177308-0d34-0410-b5e6-96231b3b80d8
* APInt-ify the gep scaling code, so that it correctly handles the case whereDan Gohman2009-10-231-0/+12
| | | | | | | the scale overflows pointer-sized arithmetic. This fixes PR5281. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84954 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests for 84931.Evan Cheng2009-10-237-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84932 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the target to select the level of anti-dependence breaking that should ↵David Goodwin2009-10-227-14/+14
| | | | | | be performed by the post-RA scheduler. The default is none. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84911 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the main portion of r31856. It was causing BranchFoldingDan Gohman2009-10-221-6/+6
| | | | | | | | | | | | | to break up CFG diamonds by banishing one of the blocks to the end of the function, which is bad for code density and branch size. This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the benchmark cited as the reason for the change, however I've examined the code and it looks more like a case of gaming a particular branch than of being generally applicable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84803 91177308-0d34-0410-b5e6-96231b3b80d8