summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bug compiling: select (i32 < i32), f32, f32Chris Lattner2005-08-101-0/+1
| | | | llvm-svn: 22747
* Update the targets to the new SETCC/CondCodeSDNode interfaces.Chris Lattner2005-08-091-109/+103
| | | | llvm-svn: 22729
* Minor cleanup patch, no functionality changes. Written by Jim Laskey.Chris Lattner2005-08-091-19/+19
| | | | llvm-svn: 22727
* Fix CodeGen/Generic/div-neg-power-2.ll, a regression from last night.Chris Lattner2005-08-091-0/+2
| | | | llvm-svn: 22726
* Factor out some common code, and be smarter about when to emit load hi/loNate Begeman2005-08-081-31/+27
| | | | | | code sequences. llvm-svn: 22719
* Remove getImmediateForOpcode, which is now dead.Chris Lattner2005-08-081-59/+0
| | | | | | Patch by Jim Laskey. llvm-svn: 22716
* Add new immediate handling support for mul/div.Chris Lattner2005-08-081-21/+30
| | | | | | Patch by Jim Laskey! llvm-svn: 22715
* Add support for OR/XOR/SUB immediates that are handled with the new immediateChris Lattner2005-08-081-37/+55
| | | | | | way. This allows ORI/ORIS pairs, for example. llvm-svn: 22714
* Modify the ISD::AND opcode case to use new immediate constant predicates.Chris Lattner2005-08-081-45/+36
| | | | | | | | | | Includes wider support for rotate and mask cases. Patch by Jim Laskey. I've requested that Jim add new regression tests the newly handled cases. llvm-svn: 22712
* Modify the ISD::ADD opcode case to use new immediate constant predicates.Chris Lattner2005-08-081-11/+15
| | | | | | | | Includes support for 32-bit constants using addi/addis. Patch by Jim Laskey. llvm-svn: 22711
* Modify existing support functions to use new immediate constant predicates.Chris Lattner2005-08-081-10/+9
| | | | | | Patch by Jim Laskey llvm-svn: 22710
* Add support predicates for future immediate constant changes.Chris Lattner2005-08-081-0/+71
| | | | | | Patch by Jim Laskey llvm-svn: 22709
* Move IsRunOfOnes to a more logical place and rename to a proper predicate formChris Lattner2005-08-081-24/+24
| | | | | | | | (lowercase isXXX). Patch by Jim Laskey. llvm-svn: 22708
* Consolidate the GPOpt stuff to all use the Subtarget, instead of stillChris Lattner2005-08-051-2/+5
| | | | | | | | depending on the command line option. Now the command line option just sets the subtarget as appropriate. G5 opts will now default to on on G5-enabled nightly testers among other machines. llvm-svn: 22688
* Fix grammar: apostrophe-s ('s) is possessive, not plural; also iff vs. if.Misha Brukman2005-08-031-4/+4
| | | | llvm-svn: 22619
* minor capitalization thing, patch by Jim LaskeyChris Lattner2005-08-031-1/+1
| | | | llvm-svn: 22617
* This hunk accidentally got dropped. Patch by Jim LaskeyChris Lattner2005-08-021-67/+0
| | | | llvm-svn: 22595
* Update to use the new MathExtras.h support for log2 computation.Chris Lattner2005-08-021-11/+35
| | | | | | Patch contributed by Jim Laskey! llvm-svn: 22594
* add a pass name to make debugging dumps nicerChris Lattner2005-08-021-0/+4
| | | | llvm-svn: 22588
* Eliminate an extra copy from R1 that Nate noticed on function calls thatChris Lattner2005-07-281-1/+2
| | | | | | have to write arguments to the stack llvm-svn: 22536
* Specify the correct number of operandsChris Lattner2005-07-281-3/+3
| | | | llvm-svn: 22535
* Fold constant adds into loads and stores to frame indices.Nate Begeman2005-07-281-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the following code: double %ext(int %A.0__, long %A.1__) { %A_addr = alloca %typedef.DComplex ; <%typedef.DComplex*> [#uses=2] %tmp.1 = cast %typedef.DComplex* %A_addr to int* ; <int*> [#uses=1] store int %A.0__, int* %tmp.1 %tmp.2 = getelementptr %typedef.DComplex* %A_addr, int 0, uint 1 ; <double*> [#uses=2] %tmp.3 = cast double* %tmp.2 to long* ; <long*> [#uses=1] store long %A.1__, long* %tmp.3 %tmp.5 = load double* %tmp.2 ; <double> [#uses=1] ret double %tmp.5 } We now generate: _ext: .LBB_ext_0: ; stw r3, -12(r1) stw r4, -8(r1) stw r5, -4(r1) lfd f1, -8(r1) blr Instead of: _ext: .LBB_ext_0: ; stw r3, -12(r1) addi r2, r1, -12 stw r4, 4(r2) stw r5, 8(r2) lfd f1, 4(r2) blr This also fires hundreds of times on MultiSource. llvm-svn: 22533
* Fix some commentsNate Begeman2005-07-271-3/+1
| | | | llvm-svn: 22530
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-11/+11
| | | | llvm-svn: 22523
* Fix an optimization put in for accessing static globals. This obviatesNate Begeman2005-07-251-5/+6
| | | | | | the need to build PIC. llvm-svn: 22512
* PowerPC no-pic code is not quite ready for prime-timeChris Lattner2005-07-221-0/+1
| | | | llvm-svn: 22507
* Support building non-PICNate Begeman2005-07-211-56/+86
| | | | | | | | Remove the LoadHiAddr pseudo-instruction. Optimization of stores to and loads from statics. Force JIT to use new non-PIC codepaths. llvm-svn: 22494
* Generate mfocrf when targeting g5. Generate fsqrt/fsqrts when targetin g5.Nate Begeman2005-07-201-3/+18
| | | | | | 8-byte align doubles. llvm-svn: 22486
* Integrate SelectFPExpr into SelectExpr. This gets PPC32 closer to beingNate Begeman2005-07-191-338/+242
| | | | | | automatically generated from a target description. llvm-svn: 22470
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-101-2/+2
| | | | | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. Also, remove some uses of dyn_cast that should really be cast (which is cheaper in a release build). llvm-svn: 22368
* Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNodeChris Lattner2005-07-101-1/+1
| | | | llvm-svn: 22366
* Make several cleanups to Andrews varargs change:Chris Lattner2005-07-051-19/+17
| | | | | | | | | | | | 1. Pass Value*'s into lowering methods so that the proper pointers can be added to load/stores from the valist 2. Intrinsics that return void should only return a token chain, not a token chain/retval pair. 3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone. 4. Now that we have Value*'s available in the lowering methods, pass them into any load/stores from the valist that are emitted llvm-svn: 22339
* Fix PowerPC varargsChris Lattner2005-07-051-24/+25
| | | | llvm-svn: 22335
* Varargs is apparently currently broken on PPC. This hacks it so that itChris Lattner2005-07-011-4/+9
| | | | | | | | is at least overloading the right virtual methods. The implementations are currently wrong though. This fixes Ptrdist/bc, but not other programs (e.g. siod). llvm-svn: 22326
* Commit fix for generating conditional branch pseudo instructions thatNate Begeman2005-06-151-3/+8
| | | | | | | avoids dereferencing the end() iterator when selecting the fallthrough block. This requires an ilist change. llvm-svn: 22212
* Commit a small improvement that is already in the x86 and ia64 backends toNate Begeman2005-06-141-0/+5
| | | | | | | not generate unnecessary register copies. This improves compile time by 2-5% depending on the test. llvm-svn: 22210
* Handle some more real world cases of rlwimi. These don't come up thatNate Begeman2005-06-081-10/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regularly in "normal" code, but for things like software graphics, they make a big difference. For the following code: unsigned short Trans16Bit(unsigned srcA,unsigned srcB,unsigned alpha) { unsigned tmpA,tmpB,mixed; tmpA = ((srcA & 0x03E0) << 15) | (srcA & 0x7C1F); tmpB = ((srcB & 0x03E0) << 15) | (srcB & 0x7C1F); mixed = (tmpA * alpha) + (tmpB * (32 - alpha)); return ((mixed >> 5) & 0x7C1F) | ((mixed >> 20) & 0x03E0); } We now generate: _Trans16Bit: .LBB_Trans16Bit_0: ; entry andi. r2, r4, 31775 rlwimi r2, r4, 15, 7, 11 subfic r4, r5, 32 mullw r2, r2, r4 andi. r4, r3, 31775 rlwimi r4, r3, 15, 7, 11 mullw r3, r4, r5 add r2, r2, r3 srwi r3, r2, 5 andi. r3, r3, 31775 rlwimi r3, r2, 12, 22, 26 blr Instead of: _Trans16Bit: .LBB_Trans16Bit_0: ; entry slwi r2, r4, 15 rlwinm r2, r2, 0, 7, 11 andi. r4, r4, 31775 or r2, r2, r4 subfic r4, r5, 32 mullw r2, r2, r4 slwi r4, r3, 15 rlwinm r4, r4, 0, 7, 11 andi. r3, r3, 31775 or r3, r4, r3 mullw r3, r3, r5 add r2, r2, r3 srwi r3, r2, 5 andi. r3, r3, 31775 srwi r2, r2, 20 rlwimi r3, r2, 0, 22, 26 blr llvm-svn: 22201
* Fix andrews changes to fit in 80 columnsChris Lattner2005-05-151-9/+18
| | | | llvm-svn: 22064
* treat TAILCALL nodes identically to CALL nodesChris Lattner2005-05-131-1/+4
| | | | llvm-svn: 21977
* Add an isTailCall flag to LowerCallToChris Lattner2005-05-131-2/+3
| | | | llvm-svn: 21958
* Realize that we don't support fmod directly, fixing ↵Chris Lattner2005-05-131-1/+3
| | | | | | CodeGen/Generic/print-arith-fp.ll llvm-svn: 21939
* rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.Chris Lattner2005-05-121-6/+6
| | | | llvm-svn: 21915
* Pass in Calling Convention to use into LowerCallToChris Lattner2005-05-121-1/+2
| | | | llvm-svn: 21899
* These targets don't like setccChris Lattner2005-05-121-0/+3
| | | | llvm-svn: 21884
* Necessary changes to codegen cttz efficiently on PowerPCNate Begeman2005-05-111-6/+28
| | | | | | | | | | 1. Teach LegalizeDAG how to better legalize CTTZ if the target doesn't have CTPOP, but does have CTLZ 2. Teach PPC32 how to do sub x, const -> add x, -const for valid consts 3. Teach PPC32 how to do and (xor a, -1) b -> andc b, a 4. Teach PPC32 that ISD::CTLZ -> PPC::CNTLZW llvm-svn: 21880
* fold and (shl X, C1), C2 -> rlwinm when possible. Many other cases are ↵Chris Lattner2005-05-091-1/+20
| | | | | | | | possible, include and (srl) and the inverses (shl and) etc. llvm-svn: 21820
* fix typoAndrew Lenharth2005-05-041-1/+1
| | | | llvm-svn: 21693
* Implement count leading zeros (ctlz), count trailing zeros (cttz), and countAndrew Lenharth2005-05-031-0/+5
| | | | | | | | | population (ctpop). Generic lowering is implemented, however only promotion is implemented for SelectionDAG at the moment. More coming soon. llvm-svn: 21676
* This target doesn't support the FSIN/FCOS/FSQRT nodes yetChris Lattner2005-04-301-0/+8
| | | | llvm-svn: 21633
* Implement Value* tracking for loads and stores in the selection DAG. This ↵Andrew Lenharth2005-04-271-11/+11
| | | | | | | | enables one to use alias analysis in the backends. (TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null. llvm-svn: 21599
OpenPOWER on IntegriCloud