summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCISelPattern.cpp
Commit message (Collapse)AuthorAge
...
* Rename canUseAsImmediateForOpcode to getImmediateForOpcode to betterNate Begeman2005-04-05
| | | | | | | | | | indicate that it is not a boolean function. Properly emit the pseudo instruction for conditional branch, so that we can fix up conditional branches whose displacements are too large. Reserve the right amount of opcode space for said pseudo instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21094 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement SDIV by power of 2 as srawi/addze rather than load imm, divwNate Begeman2005-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21091 91177308-0d34-0410-b5e6-96231b3b80d8
* Pattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-subNate Begeman2005-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21090 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that arg regs used by the call instruction are marked as such, soNate Begeman2005-04-04
| | | | | | | | that regalloc doesn't cleverly reuse early arg regs loading later arg regs. This fixes almost all outstanding failures in the pattern isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21086 91177308-0d34-0410-b5e6-96231b3b80d8
* i1 loads should also be from the low byte of the argument word.Nate Begeman2005-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21077 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix i64 return, fix CopyFromRegNate Begeman2005-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21076 91177308-0d34-0410-b5e6-96231b3b80d8
* Full varargs support. All of UnitTests now passesNate Begeman2005-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21070 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the correct value for the chain to the storeNate Begeman2005-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21066 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SHL_PARTSNate Begeman2005-04-03
| | | | | | | Start implementation of integer varargs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21065 91177308-0d34-0410-b5e6-96231b3b80d8
* Keeping up with the Joneses.Nate Begeman2005-04-03
| | | | | | | Implement not, nor, nand, and eqv git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21060 91177308-0d34-0410-b5e6-96231b3b80d8
* Set shift amount to ExtendNate Begeman2005-04-02
| | | | | | | | | Implement ISD::FABS and ISD::FNEG nodes Implement SHL_PARTS, SRL_PARTS, and SRA_PARTS Generate PowerPC 'fneg', 'fabs', and 'fnabs' instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21018 91177308-0d34-0410-b5e6-96231b3b80d8
* This target doesn't support fabs/fneg yet.Chris Lattner2005-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21010 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix i64 returnsNate Begeman2005-04-02
| | | | | | | Generate PowerPC 'subfic' instruction when appropriate git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20995 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ISD::UNDEF nodeNate Begeman2005-04-01
| | | | | | | | | | Teach the SelectionDAG code how to expand and promote it Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp arguments, but not shadowing their value. This allows us to do the right thing with both fixed and vararg floating point arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20988 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Olden/bh, CR0 was being set in the wrong orderNate Begeman2005-04-01
| | | | | | | | LowerCallTo and ISD::CALL are going to need to be modified, regs are being set in the wrong order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20981 91177308-0d34-0410-b5e6-96231b3b80d8
* Also apply Chris's fix to FP select and SETCCNate Begeman2005-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20979 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the selection of the arms of the select operation up to the conditionalChris Lattner2005-04-01
| | | | | | | part to make sure we get the side effects and to avoid confusing the CFG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stores to global addressesNate Begeman2005-04-01
| | | | | | | Fix calls with no arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20975 91177308-0d34-0410-b5e6-96231b3b80d8
* Support indexed loads and stores. This drops Shootout/matrix time fromNate Begeman2005-04-01
| | | | | | | | 18.8 to 14.8 seconds. The Pattern ISel is now often faster than the Simple ISel, esp. on memory intensive code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20973 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement FP_TO_SINT and FP_TO_UINTNate Begeman2005-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20972 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for adding 0.0 and -0.0 to the constant pool, since we lie andNate Begeman2005-04-01
| | | | | | | say that we support them, for the purposes of generating fsel instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20970 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out common code, support FP comparison in folded SetCCNate Begeman2005-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20969 91177308-0d34-0410-b5e6-96231b3b80d8
* fsel generation for f32 and f64 selectNate Begeman2005-03-31
| | | | | | | | | | | generate compare immediate for integer compare with constant fold setcc into branch fold setcc into select Code generation quality for Shootout is now on par with the Simple ISel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20968 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the correct values to the chain argument for node construction duringNate Begeman2005-03-31
| | | | | | | | | LowerCallTo. Handle ISD::ADD in SelectAddr, allowing us to have nonzero immediates for loads and stores, amazing! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20946 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite LowerCallTo and Select(ISD::CALL) to properly handle float varargsNate Begeman2005-03-31
| | | | | | | | | | | | | Tell the SelectionDAG ISel to expand SEXTLOAD of i1 and i8, rather than complicate the code in ISD::SEXTLOAD to do it by hand Combine the FP and Int ISD::LOAD codegen Generate better code for constant pool loads As a result, all of Shootout, and likely many other programs are now working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20945 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix calls whose arguments fit entirely in registers to not break the Chain.Nate Begeman2005-03-30
| | | | | | | | Implement SINT_TO_FP and UINT_TO_FP Remove some dead code from the simple ISel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20944 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix frame index code to generate legal PowerPC instructions. About half ofNate Begeman2005-03-30
| | | | | | | Shootout now works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20940 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix external symbol printing in the AsmPrinter. Tell the ISel that weNate Begeman2005-03-30
| | | | | | | | don't support things like memcpy directly. This allows a handful of the Shootout programs to work, yay! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20939 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix BranchCC (it's still dumb), and implement FP select (also dumb)Nate Begeman2005-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20935 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement integer select and i1 sign extendNate Begeman2005-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20934 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement SetCC, fix ZERO_EXTEND_INREGNate Begeman2005-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20933 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a warning in the optimized buildChris Lattner2005-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20920 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement div, rem, and frameindexNate Begeman2005-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20907 91177308-0d34-0410-b5e6-96231b3b80d8
* Pattern ISel: fix argument loading for i64s (thanks chris)Nate Begeman2005-03-28
| | | | | | | Simple ISel: fix i64 subtract git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20903 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove fake instruction 'subc' (mnemonic for subfc).Nate Begeman2005-03-28
| | | | | | | More pattern isel updates git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20902 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement proper loads and zero-extends of all typesNate Begeman2005-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20897 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix that pesky floats in integer regs problem by assigning the f32 type toNate Begeman2005-03-26
| | | | | | | | the correct register class. Also remove the loading of float data into int regs part of varargs; it will need to be implemented differently later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20857 91177308-0d34-0410-b5e6-96231b3b80d8
* Get closer to having varargs working. There's still something strangeNate Begeman2005-03-26
| | | | | | | | going on with copies between floating point and integer register files being generated. Once that is solved, varargs will be done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20856 91177308-0d34-0410-b5e6-96231b3b80d8
* Make 64bit args and float args work correct with calls. Thanks to ChrisNate Begeman2005-03-26
| | | | | | | for explaining EXTRACT_ELEMENT to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20847 91177308-0d34-0410-b5e6-96231b3b80d8
* Next round of pattern isel changes, mostly dealing with calls.Nate Begeman2005-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20841 91177308-0d34-0410-b5e6-96231b3b80d8
* Support global addresses and fix call returns. Varargs still aren'tNate Begeman2005-03-25
| | | | | | | | handled correctly for floating point arguments, or more than 8 arguemnts. This does however, allow hello world to run. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20832 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement next round of Pattern ISel fixesNate Begeman2005-03-24
| | | | | | | | | 1. void returns 2. multiplies 3. calls git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20822 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement more of the PPC32 Pattern ISel:Nate Begeman2005-03-24
| | | | | | | | | | | | | | 1) dynamic stack alloc 2) loads 3) shifts 4) subtract 5) immediate form of add, and, or, xor 6) change flag from -pattern-isel to -enable-ppc-pattern-isel Remove dead arguments from getGlobalBaseReg in the simple ISel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20810 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix silly "no newline at end of file" warningChris Lattner2005-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20809 91177308-0d34-0410-b5e6-96231b3b80d8
* Addition of the PPC32 Pattern ISel. While it is far from complete, it willNate Begeman2005-03-24
be brought up to parity with the current simple ISel in the coming days. Currently, -pattern-isel is required to trigger it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20805 91177308-0d34-0410-b5e6-96231b3b80d8