summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCISelPattern.cpp
Commit message (Collapse)AuthorAge
* Goodbye PPC pattern isel. You have served us well, but it is now time forChris Lattner2006-01-12
| | | | | | | you to ride off into the sunset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25236 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead codeChris Lattner2005-12-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24965 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a comment bug:Evan Cheng2005-11-29
| | | | | | | createPPCPatternInstructionSelector -> createPPCISelPattern git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24510 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to clean up function call pseudos and support the BLA instruction,Nate Begeman2005-11-16
| | | | | | | | which branches to an absolute address. This is required to support objc direct dispatch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24370 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the target constant divide optimization up into the dag combiner, soNate Begeman2005-10-20
| | | | | | | | that the nodes can be folded with other nodes, and we can not duplicate code in every backend. Alpha will probably want this too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23835 91177308-0d34-0410-b5e6-96231b3b80d8
* First bits of 64 bit PowerPC stuff, currently disabled. A lot of this isNate Begeman2005-10-18
| | | | | | | purely mechanical. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23778 91177308-0d34-0410-b5e6-96231b3b80d8
* More PPC32 -> PPC changes, as well as merging some classes that wereNate Begeman2005-10-16
| | | | | | | redundant after the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23759 91177308-0d34-0410-b5e6-96231b3b80d8
* remove broken SRA/rlwimi caseChris Lattner2005-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23746 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PPC32*.h to PPC*.hChris Lattner2005-10-14
| | | | | | | This completes the grand PPC file renaming git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23745 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PowerPC*.h to PPC*.hChris Lattner2005-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23743 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PowerPCInstrBuilder.h -> PPC*Chris Lattner2005-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23742 91177308-0d34-0410-b5e6-96231b3b80d8
* Nuke PowerPCInstrFormats.h, its contents are dead. Remove the definitionsChris Lattner2005-10-14
| | | | | | | from the .td file that correspond to it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23736 91177308-0d34-0410-b5e6-96231b3b80d8
* another solution to the fsel issue. Instead of having 4 variants, just forceChris Lattner2005-10-02
| | | | | | | | the comparison to be 64-bits. This is fine because extensions from float to double are free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23589 91177308-0d34-0410-b5e6-96231b3b80d8
* fsel can take a different FP type for the comparison and for the result. As ↵Chris Lattner2005-10-02
| | | | | | | | | such split the FSEL family into 4 things instead of just two. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23588 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the ppc backend to use two register classes for FP: F8RC and F4RC.Chris Lattner2005-10-01
| | | | | | | | These are used to represent float and double values, and the two regclasses contain the same physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23577 91177308-0d34-0410-b5e6-96231b3b80d8
* consistency with other cases, no functionality changeChris Lattner2005-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23524 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FP versions of the binary operators, keeping the int and fp worlds seperate.Chris Lattner2005-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23506 91177308-0d34-0410-b5e6-96231b3b80d8
* PowerPC cannot truncstore i1 nativelyChris Lattner2005-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23304 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement i64<->fp using the fctidz/fcfid instructions on PowerPC when weNate Begeman2005-09-06
| | | | | | | | | | are allowed to generate 64-bit-only PowerPC instructions for 32 bit hosts, such as the PowerPC 970. This speeds up 189.lucas from 81.99 to 32.64 seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23250 91177308-0d34-0410-b5e6-96231b3b80d8
* Move FCTIWZ handling out of the instruction selectors and into legalization,Chris Lattner2005-08-31
| | | | | | | getting them out of the business of making stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23180 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead codeChris Lattner2005-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23179 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove code that is now dead from the pattern isel.Chris Lattner2005-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23177 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle AssertSext/AssertZext nodes, fixing the regressions last night.Chris Lattner2005-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23170 91177308-0d34-0410-b5e6-96231b3b80d8
* Make fsel emission work with both the pattern and dag-dag selectors, byChris Lattner2005-08-26
| | | | | | | | | giving it a non-instruction opcode. The dag->dag selector used to not select the operands of the fsel, because it thought that whole tree was already selected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23091 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some code made dead by the fsel patchNate Begeman2005-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23085 91177308-0d34-0410-b5e6-96231b3b80d8
* now that fsel is formed during legalization, this code is deadChris Lattner2005-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23084 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantPoolSDNode to actually hold the Constant itself instead ofChris Lattner2005-08-26
| | | | | | | | | putting it into the constant pool. This allows the isel machinery to create constants that it will end up deciding are not needed, without them ending up in the resultant function constant pool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23081 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some warnings in an optimized buildChris Lattner2005-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23080 91177308-0d34-0410-b5e6-96231b3b80d8
* add initial support for converting select_cc -> fsel in the legalizerChris Lattner2005-08-26
| | | | | | | | | | instead of in the backend. This currently handles fsel cases with registers, but doesn't have the 0.0 and -0.0 optimization enabled yet. Once this is finished, special hack for fp immediates can go away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23075 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify the add/sub_parts codeChris Lattner2005-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23065 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify some code. It's not clear why the UDIV expanded sequenceChris Lattner2005-08-25
| | | | | | | doesn't work for large uint constants, but we'll keep the current behavior git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23061 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 colsChris Lattner2005-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23051 91177308-0d34-0410-b5e6-96231b3b80d8
* Split IMPLICIT_DEF into IMPLICIT_DEF_GPR and IMPLICIT_DEF_FP, so that theChris Lattner2005-08-24
| | | | | | | | instructions take a consistent reg class. Implement ISD::UNDEF in the dag->dag selector to generate this, fixing UnitTests/2003-07-06-IntOverflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23028 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead cases.Chris Lattner2005-08-24
| | | | | | | | | | | | | | Emit the indcall sequence as: mtctr inreg mr R12, inreg btctr If inreg and R12 aren't coallesced, this reduces the odds of having the mtctr and btctr in the same dispatch group. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23023 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoops, fix a thinko. All cases except SETNE are now handled by theNate Begeman2005-08-24
| | | | | | | target independent code in SelectionDAG.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23002 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the "ppc specific" setcc-equivalent select_cc casesNate Begeman2005-08-24
| | | | | | | Prefer 'neg X' to 'subfic 0, X' since it does not set XER[CA] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23000 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure expressions only have one use before emitting them into a place ↵Chris Lattner2005-08-22
| | | | | | that is conditionally executed git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22960 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the logic for BRTWOWAY_CC handling. The isel code alreadyChris Lattner2005-08-21
| | | | | | | | | simplifies BRTWOWAY into BR if one of the results is a fall-through. Unless I'm missing something, there is no reason to duplicate this in the target-specific code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22952 91177308-0d34-0410-b5e6-96231b3b80d8
* If the false value for a select_cc is really simple (has no inputs), evaluateChris Lattner2005-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it in the block. This codegens: int %test(bool %c) { %retval = select bool %c, int 17, int 1 ret int %retval } as: _test: rlwinm r2, r3, 0, 31, 31 li r2, 17 cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; li r2, 1 .LBB_test_2: ; or r3, r2, r2 blr instead of: _test: rlwinm r2, r3, 0, 31, 31 li r2, 17 li r4, 1 cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; or r2, r4, r4 .LBB_test_2: ; or r3, r2, r2 blr ... which is one fewer instruction. The savings are more significant for global address and constantfp nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22946 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug where we were passing the wrong number of arguments to anNate Begeman2005-08-19
| | | | | | | instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22901 91177308-0d34-0410-b5e6-96231b3b80d8
* MFLR doesn't take an operand, the LR register is implicitChris Lattner2005-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22882 91177308-0d34-0410-b5e6-96231b3b80d8
* More optimal solution for loading constants.Jim Laskey2005-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22870 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix int foo() { return 65535; } by using the top 16 bits of the constantNate Begeman2005-08-18
| | | | | | | | | as the argument to LIS rather than the result of HA16(constant). The DAG->DAG ISel was already doing the right thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22865 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve ISD::Constant codegen.Nate Begeman2005-08-18
| | | | | | | | | | | | | | | | Now for int foo() { return -1; } we generate: _foo: li r3, -1 blr instead of _foo: lis r2, -1 ori r3, r2, 65535 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22864 91177308-0d34-0410-b5e6-96231b3b80d8
* replace switch stmt with an assert, generate li 0 instead of lis 0 for 0,Chris Lattner2005-08-18
| | | | | | | to make the code follow people's expectations better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22861 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle loading of 0x????0000 constants with a single instruction.Jim Laskey2005-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22858 91177308-0d34-0410-b5e6-96231b3b80d8
* Better version of isIntImmediate.Jim Laskey2005-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22848 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few small typos I noticed when converting this over to the DAG->DAGChris Lattner2005-08-17
| | | | | | | | selector. Also, there is no difference between addSImm and addImm, so just use addImm, folding some branches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22819 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed UINT_TO_FP and SINT_TO_FP from ISel outright.Jim Laskey2005-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22818 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ISel code generation for UINT_TO_FP and SINT_TO_FP. Now asserts ifJim Laskey2005-08-17
| | | | | | | marked as legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22816 91177308-0d34-0410-b5e6-96231b3b80d8