summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
Commit message (Collapse)AuthorAgeFilesLines
* convert to filecheck style, simplify RUN line, and add comment.Chris Lattner2009-07-141-7/+7
| | | | llvm-svn: 75667
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | additional bug fixes: 1. The bug that everyone hit was a problem in the asmprinter where it would remove $stub but keep the L prefix on a name when emitting the indirect symbol. This is easy to fix by keeping the name of the stub and the name of the symbol in a StringMap instead of just keeping a StringSet and trying to reconstruct it late. 2. There was a problem printing the personality function. The current logic to print out the personality function from the DWARF information is a bit of a cesspool right now that duplicates a bunch of other logic in the asm printer. The short version of it is that it depends on emitting both the L and _ prefix for symbols (at least on darwin) and until I can untangle it, it is best to switch the mangler back to emitting both prefixes. llvm-svn: 75646
* Revert r75610 (and r75620, which was blocking the revert), in the hopes ofDaniel Dunbar2009-07-141-2/+2
| | | | | | | | | | | | | | unbreaking llvm-gcc (on Darwin). --- Reverse-merging r75620 into '.': U include/llvm/Support/Mangler.h --- Reverse-merging r75610 into '.': U test/CodeGen/X86/loop-hoist.ll G include/llvm/Support/Mangler.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp U lib/VMCore/Mangler.cpp llvm-svn: 75636
* Change the X86 asmprinter to use the mangler to apply suffixes like ↵Chris Lattner2009-07-141-2/+2
| | | | | | | | | | | | | | | | "$non_lazy_ptr" to symbols instead of doing it with "printSuffixedName". This gets us to the point where there is a real separation between computing a symbol name and printing it, something I need for MC printer stuff. This patch also fixes a corner case bug where unnamed private globals wouldn't get the private label prefix. Next up, rename all uses of getValueName -> getMangledName for better greppability, and then tackle the ppc/arm backends to eliminate "printSuffixedName". llvm-svn: 75610
* Change the internal interface to makeNameProper to take a bool thatChris Lattner2009-07-141-1/+1
| | | | | | | | | | | | indicates whether the label is private or not, instead of taking prefix stuff. One effect of this is that symbols will be generated with *just* the private prefix, instead of both the private prefix *and* the user-label-prefix, but this doesn't matter as long as it is consistent. For example we'll now get "Lfoo" instead of "L_foo". These are just assembler temporary labels anyway, so they never even make it into the .o file. llvm-svn: 75607
* Check for the correct unnamed name.Bill Wendling2009-07-141-1/+1
| | | | llvm-svn: 75573
* Two changes:Chris Lattner2009-07-131-2/+1
| | | | | | | | | | | 1) unique globals with the existing "Count" local in Mangler, not with atomic nonsense. Using atomics will give us nondeterminstic output from the compiler when using multiple threads, which is bad. 2) Do not mangle an unknown global name with a type suffix. We don't need this anymore now that llvm ir doesn't have type planes. llvm-svn: 75541
* add nounwindChris Lattner2009-07-121-1/+1
| | | | llvm-svn: 75407
* Darwin prepends an _ to internal globals, Linux doesn't.Nick Lewycky2009-07-111-1/+1
| | | | llvm-svn: 75405
* fix x86-64 static codegen to materialize the address of a global with movl ↵Chris Lattner2009-07-111-37/+37
| | | | | | | | | | | | | | | | | | instead of lea. It is better for code size (and presumably efficiency) to use: movl $foo, %eax rather than: leal foo, eax Both give a nice zero extending "move immediate" instruction, the former is just smaller. Note that global addresses should be handled different by the x86 backend, but I chose to follow the style already in place and add more fixme's. llvm-svn: 75403
* this test was incorrect for x86-64 static. It passed on darwin, because darwinChris Lattner2009-07-111-1/+5
| | | | | | doesn't have static x86-64 mode. llvm-svn: 75392
* Fix PR4533, which is about buggy codegen in x86-64 -static mode.Chris Lattner2009-07-111-20/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | Basically, using: lea symbol(%rip), %rax is not valid in -static mode, because the current RIP may not be within 32-bits of "symbol" when an app is built partially pic and partially static. The fix for this is to compile it to: lea symbol, %rax It would be better to codegen this as: movq $symbol, %rax but that will come next. The hard part of fixing this bug was fixing abi-isel, which was actively testing for the wrong behavior. Also, the RUN lines are completely impossible to understand what they are testing. To help with this, convert the -static x86-64 codegen tests to use filecheck. This is much more stable and makes it more clear what the codegen is expected to be. llvm-svn: 75382
* We get the P modifier wrong in a lot of cases, just add some more rigorous ↵Chris Lattner2009-07-111-30/+59
| | | | | | | | testing. In addition to fixing this, I still need to do some more testing on darwin. llvm-svn: 75362
* Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned Eli Friedman2009-07-092-0/+19
| | | | | | | | | value. Adjust other code to deal with that correctly. Make DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of this new flexibility to simplify the code and make it deal with unusual vectors (like <4 x i1>) correctly. Fixes PR3037. llvm-svn: 75176
* Targets sometimes assign fixed stack object to spill certain callee-savedEvan Cheng2009-07-093-2/+4
| | | | | | | | | | registers based on dynamic conditions. For example, X86 EBP/RBP, when used as frame register has to be spilled in the first fixed object. It should inform PEI this so it doesn't get allocated another stack object. Also, it should not be spilled as other callee-saved registers but rather its spilling and restoring are being handled by emitPrologue and emitEpilogue. Avoid spilling it twice. llvm-svn: 75116
* remove eh, convert to FileCheck styleChris Lattner2009-07-091-6/+9
| | | | llvm-svn: 75087
* we have no tests for dllimport/export. Add one.Chris Lattner2009-07-091-0/+9
| | | | llvm-svn: 75085
* * add some assertions for sanity checking.Chris Lattner2009-07-091-1/+1
| | | | | | | | * remove some old code that was needed when we'd put ESP in the scale instead of the base of some instructions. * Fix a bug with the P modifier in inline asm that caused us to drop it. llvm-svn: 75077
* add a test for dale's recent change.Chris Lattner2009-07-091-11/+34
| | | | llvm-svn: 75074
* switch test to FileCheck-style and test the P and non-P cases.Chris Lattner2009-07-081-4/+19
| | | | llvm-svn: 75071
* rename a test to make it a feature test.Chris Lattner2009-07-081-0/+0
| | | | llvm-svn: 75070
* add some more check for vector compares.Chris Lattner2009-07-081-2/+36
| | | | llvm-svn: 75024
* convert a test to "FileCheck" style.Chris Lattner2009-07-081-3/+27
| | | | llvm-svn: 75023
* eliminate the v[if]cmp versions of these tests, now that [if]cmp+sext works.Chris Lattner2009-07-083-42/+1
| | | | llvm-svn: 74980
* dag combine sext(setcc) -> vsetcc before legalize. To make this safe,Chris Lattner2009-07-081-1/+1
| | | | | | | | | VSETCC must define all bits, which is different than it was documented to before. Since all targets that implement VSETCC already have this behavior, and we don't optimize based on this, just change the documentation. We now get nice code for vec_compare.ll llvm-svn: 74978
* add support for legalizing an icmp where the result is illegal (4xi1) butChris Lattner2009-07-071-0/+7
| | | | | | the input is legal (4 x i32) llvm-svn: 74964
* add a trivial test that vector compares work.Chris Lattner2009-07-071-0/+7
| | | | llvm-svn: 74963
* implement support for spliting and scalarizing vector setcc's. ThisChris Lattner2009-07-071-0/+28
| | | | | | | finishes off enough support for vector compares to get the icmp/fcmp version of 2008-07-23-VSetCC.ll passing. llvm-svn: 74961
* verify that the fcmp version of this works just as well as theChris Lattner2009-07-071-0/+12
| | | | | | vfcmp version. We actually get better code for this silly testcase. llvm-svn: 74954
* Avoid adding a duplicate def. This fixes PR4478.Evan Cheng2009-07-061-0/+137
| | | | llvm-svn: 74857
* @GOTPCREL is also rip-relative. Fix fast-isel to do the right thing.Chris Lattner2009-07-021-1/+1
| | | | | | This fixes an llvm-gcc bootstrap problem I introduced. llvm-svn: 74691
* Fix yet-another bug I introduced into fastisel, this time handlingChris Lattner2009-07-021-0/+17
| | | | | | constant pool references that weren't getting properly rip-relative. llvm-svn: 74689
* Fix some fast-isel problems selecting global variable addressing inChris Lattner2009-07-011-0/+24
| | | | | | pic mode. llvm-svn: 74582
* Fix PR4485.Rafael Espindola2009-06-302-1/+16
| | | | | | | Avoid unnecessary duplication of operand 0 of X86::FpSET_ST0_80. This duplication would cause one register to remain on the stack at the function return. llvm-svn: 74534
* Fix PR4484.Rafael Espindola2009-06-301-0/+15
| | | | | | This was caused by me confounding FP0 and ST(0). llvm-svn: 74523
* FIX PR 4459.Rafael Espindola2009-06-291-0/+15
| | | | | | | Not sure I understand how the temp register gets used, but this fixes a bug and introduces no regressions. llvm-svn: 74446
* factor some logic out into a helper function, allow remat of loads from constantChris Lattner2009-06-271-2/+1
| | | | | | globals. This implements remat-constant.ll even without aggressive-remat. llvm-svn: 74373
* Reimplement rip-relative addressing in the X86-64 backend. The newChris Lattner2009-06-272-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation primarily differs from the former in that the asmprinter doesn't make a zillion decisions about whether or not something will be RIP relative or not. Instead, those decisions are made by isel lowering and propagated through to the asm printer. To achieve this, we: 1. Represent RIP relative addresses by setting the base of the X86 addr mode to X86::RIP. 2. When ISel Lowering decides that it is safe to use RIP, it lowers to X86ISD::WrapperRIP. When it is unsafe to use RIP, it lowers to X86ISD::Wrapper as before. 3. This removes isRIPRel from X86ISelAddressMode, representing it with a basereg of RIP instead. 4. The addressing mode matching logic in isel is greatly simplified. 5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate passed through various printoperand routines is gone now. 6. The various symbol printing routines in asmprinter now no longer infer when to emit (%rip), they just print the symbol. I think this is a big improvement over the previous situation. It does have two small caveats though: 1. I implemented a horrible "no-rip" modifier for the inline asm "P" constraint modifier. This is a short term hack, there is a much better, but more involved, solution. 2. I had to xfail an -aggressive-remat testcase because it isn't handling the use of RIP in the constant-pool reading instruction. This specific test is easy to fix without -aggressive-remat, which I intend to do next. llvm-svn: 74372
* remove some unneeded eh info.Chris Lattner2009-06-273-4/+4
| | | | llvm-svn: 74371
* testcase for PR4466Chris Lattner2009-06-271-0/+16
| | | | llvm-svn: 74367
* Add some testcases for some of the recent ScalarEvolution bug fixes.Dan Gohman2009-06-261-0/+386
| | | | llvm-svn: 74353
* remove unwind info, add test for asmprinting of jump table labels with (%rip)Chris Lattner2009-06-261-1/+4
| | | | llvm-svn: 74337
* Add x86 support for 'n' inline asm modifier. This will be handled target ↵Evan Cheng2009-06-261-0/+8
| | | | | | independently as part of MC work. llvm-svn: 74336
* down with unwind info :)Chris Lattner2009-06-251-1/+1
| | | | llvm-svn: 74206
* unwind info not needed.Chris Lattner2009-06-241-1/+1
| | | | llvm-svn: 74112
* Fix support for inline asm input / output operand tying when operand spans ↵Evan Cheng2009-06-241-0/+19
| | | | | | across multiple registers (e.g. two i64 operands in 32-bit mode). llvm-svn: 74053
* Extend ScalarEvolution's multiple-exit support to compute exactDan Gohman2009-06-241-1/+1
| | | | | | | | | | | | | | | trip counts in more cases. Generalize ScalarEvolution's isLoopGuardedByCond code to recognize And and Or conditions, splitting the code out into an isNecessaryCond helper function so that it can evaluate Ands and Ors recursively, and make SCEVExpander be much more aggressive about hoisting instructions out of loops. test/CodeGen/X86/pr3495.ll has an additional instruction now, but it appears to be due to an arbitrary register allocation difference. llvm-svn: 74048
* Fix PR4185.Rafael Espindola2009-06-211-0/+10
| | | | | | Handle FpSET_ST0_80 being used when ST0 is still alive. llvm-svn: 73850
* change TLS_ADDR lowering to lower to a real mem operand, instead of matching asChris Lattner2009-06-204-4/+4
| | | | | | | | | | | | a global with that gets printed with the :mem modifier. All operands to lea's should be handled with the lea32mem operand kind, and this allows the TLS stuff to do this. There are several better ways to do this, but I went for the minimal change since I can't really test this (beyond make check). This also makes the use of EBX explicit in the operand list in the 32-bit, instead of implicit in the instruction. llvm-svn: 73834
* no need for unwind infoChris Lattner2009-06-201-1/+1
| | | | llvm-svn: 73832
OpenPOWER on IntegriCloud