summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Add a new AddToWorkList method, start using itChris Lattner2006-03-011-57/+63
| | | | llvm-svn: 26441
* Pull shifts by a constant through multiplies (a form of reassociation),Chris Lattner2006-03-011-0/+27
| | | | | | implementing Regression/CodeGen/X86/mul-shift-reassoc.ll llvm-svn: 26440
* Vector ops lowering.Evan Cheng2006-03-013-50/+76
| | | | llvm-svn: 26436
* - Added VConstant as an abstract version of ConstantVec.Evan Cheng2006-03-011-12/+19
| | | | | | | - All abstrct vector nodes must have # of elements and element type as their first two operands. llvm-svn: 26432
* Compile:Chris Lattner2006-02-281-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | unsigned foo4(unsigned short *P) { return *P & 255; } unsigned foo5(short *P) { return *P & 255; } to: _foo4: lbz r3,1(r3) blr _foo5: lbz r3,1(r3) blr not: _foo4: lhz r2, 0(r3) rlwinm r3, r2, 0, 24, 31 blr _foo5: lhz r2, 0(r3) rlwinm r3, r2, 0, 24, 31 blr llvm-svn: 26419
* Fold "and (LOAD P), 255" -> zextload. This allows us to compile:Chris Lattner2006-02-281-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unsigned foo3(unsigned *P) { return *P & 255; } as: _foo3: lbz r3, 3(r3) blr instead of: _foo3: lwz r2, 0(r3) rlwinm r3, r2, 0, 24, 31 blr and: unsigned short foo2(float a) { return a; } as: _foo2: fctiwz f0, f1 stfd f0, -8(r1) lhz r3, -2(r1) blr instead of: _foo2: fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) rlwinm r3, r2, 0, 16, 31 blr llvm-svn: 26417
* fold (sra (sra x, c1), c2) -> (sra x, c1+c2)Chris Lattner2006-02-281-3/+11
| | | | llvm-svn: 26416
* Add support for output memory constraints.Chris Lattner2006-02-271-7/+38
| | | | llvm-svn: 26410
* remove some completed notesChris Lattner2006-02-271-4/+0
| | | | llvm-svn: 26390
* Print ConstantPoolSDNode offset field.Evan Cheng2006-02-261-0/+5
| | | | llvm-svn: 26381
* Added an offset field to ConstantPoolSDNode.Evan Cheng2006-02-252-9/+14
| | | | llvm-svn: 26371
* Pass all the flags to the asm printer, not just the # operands.Chris Lattner2006-02-241-1/+1
| | | | llvm-svn: 26362
* rename NumOps -> NumVals to avoid shadowing a NumOps var in an outer scope.Chris Lattner2006-02-241-5/+11
| | | | | | Add support for addressing modes. llvm-svn: 26361
* Refactor operand adding out to a new AddOperand methodChris Lattner2006-02-241-66/+81
| | | | llvm-svn: 26358
* Get VC++ building again.Jeff Cohen2006-02-241-0/+1
| | | | llvm-svn: 26351
* Implement (most of) selection of inline asm memory operands.Chris Lattner2006-02-241-0/+42
| | | | llvm-svn: 26350
* Lower C_Memory operands.Chris Lattner2006-02-241-25/+44
| | | | llvm-svn: 26346
* Fix an endianness problem on big-endian targets with expanded operandsChris Lattner2006-02-231-9/+16
| | | | | | to inline asms. Mark some methods const. llvm-svn: 26334
* Record all of the expanded registers in the DAG and machine instr, fixingChris Lattner2006-02-232-74/+125
| | | | | | several bugs in inline asm expanded operands. llvm-svn: 26332
* This fixes a couple of problems with expansionChris Lattner2006-02-221-9/+23
| | | | llvm-svn: 26318
* Change a whole bunch of code to be built around RegsForValue instead ofChris Lattner2006-02-221-124/+248
| | | | | | | a single register number. This fully implements promotion for inline asms, expand is close but not quite right yet. llvm-svn: 26316
* split register class handling from explicit physreg handling.Chris Lattner2006-02-221-34/+77
| | | | llvm-svn: 26308
* Adjust to changes in getRegForInlineAsmConstraint prototypeChris Lattner2006-02-211-18/+18
| | | | llvm-svn: 26306
* Fix a problem Nate and Duraid reported where simplifying nodes can causeChris Lattner2006-02-201-4/+8
| | | | | | | them to get ressurected, in which case, deleting the undead nodes is unfriendly. llvm-svn: 26291
* Fix a problem on itanium with memset. The value to set has been promoted toChris Lattner2006-02-201-2/+6
| | | | | | i64 before this code, so zero_ext doesn't work. llvm-svn: 26290
* Add checks to make sure we don't create bogus extend nodes, and fix a bugNate Begeman2006-02-182-4/+14
| | | | | | | where we were doing exactly that which was causing failures on x86 and alpha. llvm-svn: 26284
* Fix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn'tChris Lattner2006-02-172-9/+95
| | | | | | | exactly the API we wanted to call into. This fixes the crash on crafty last night. llvm-svn: 26269
* Clean up DemandedBitsAreZero interfaceNate Begeman2006-02-171-22/+26
| | | | | | | Make more use of the new mask helpers in valuetypes.h Combine (sra (srl x, c1), c1) -> sext_inreg if legal llvm-svn: 26263
* Don't expand sdiv by power of two before legalize, since it will likelyNate Begeman2006-02-171-2/+2
| | | | | | generate illegal nodes. llvm-svn: 26261
* kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBCNate Begeman2006-02-173-62/+47
| | | | | | | and SUBE nodes that actually expose what's going on and allow for significant simplifications in the targets. llvm-svn: 26255
* Fix another miscompilation exposed by lencode, where we lowered i64->f32Chris Lattner2006-02-171-1/+1
| | | | | | | conversions to __floatdidf instead of __floatdisf on targets that support f32 but not i64 (e.g. sparc). llvm-svn: 26254
* Dumb bug. Code sees a memcpy from X+c so it increments src offset. But itEvan Cheng2006-02-161-4/+10
| | | | | | | turns out not to point to a constant string but it forgot change the offset back. llvm-svn: 26242
* Rework the SelectionDAG-based implementations of SimplifyDemandedBitsNate Begeman2006-02-161-35/+17
| | | | | | | and ComputeMaskedBits to match the new improved versions in instcombine. Tested against all of multisource/benchmarks on ppc. llvm-svn: 26238
* If the false case is the current basic block, then this is a self loop.Evan Cheng2006-02-161-0/+9
| | | | | | | | | | We do not want to emit "Loop: ... brcond Out; br Loop", as it adds an extra instruction in the loop. Instead, invert the condition and emit "Loop: ... br!cond Loop; br Out. Generalize the fix by moving it from PPCDAGToDAGISel to SelectionDAGLowering. llvm-svn: 26231
* Lowering of sdiv X, pow2 was broken, this fixes it. This patch is writtenChris Lattner2006-02-161-6/+12
| | | | | | by Nate, I'm just committing it for him. llvm-svn: 26230
* Remove an unused function parameter.Evan Cheng2006-02-151-2/+2
| | | | llvm-svn: 26221
* Turn a memcpy from string constant into a series of stores of constant values.Evan Cheng2006-02-151-47/+69
| | | | llvm-svn: 26219
* Should not combine ISD::LOCATIONs until we have scheme to remove fromJim Laskey2006-02-152-36/+2
| | | | | | MachineDebugInfo tables. llvm-svn: 26216
* Lower memcpy with small constant size operand into a series of load / storeEvan Cheng2006-02-151-8/+34
| | | | | | ops. llvm-svn: 26195
* Doh again!Evan Cheng2006-02-141-1/+1
| | | | llvm-svn: 26188
* Keep to < 80 colsEvan Cheng2006-02-141-6/+6
| | | | llvm-svn: 26177
* Missed a break so memcpy cases fell through to memset. Doh.Evan Cheng2006-02-141-1/+1
| | | | llvm-svn: 26176
* Fixed a build breakage.Evan Cheng2006-02-141-14/+23
| | | | llvm-svn: 26175
* Rename maxStoresPerMemSet to maxStoresPerMemset, etc.Evan Cheng2006-02-141-1/+1
| | | | llvm-svn: 26174
* Expand memset dst, c, size to a series of stores if size falls below theEvan Cheng2006-02-141-4/+127
| | | | | | target specific theshold, e.g. 16 for x86. llvm-svn: 26171
* now that libcalls don't suck, we can remove this hackChris Lattner2006-02-141-6/+2
| | | | llvm-svn: 26164
* Fix a latent bug in the call sequence handling stuff. Some targets (e.g. x86)Chris Lattner2006-02-141-4/+11
| | | | | | create these nodes with flag results. Remember that we legalized them. llvm-svn: 26156
* Rename to better reflect usage (current and planned.)Jim Laskey2006-02-131-1/+1
| | | | llvm-svn: 26145
* Completely rewrite libcall insertion by the legalizer, providing theChris Lattner2006-02-131-198/+217
| | | | | | | | | | | | | | | | following handy-dandy properties: 1. it is always correct now 2. it is much faster than before 3. it is easier to understand This implementation builds off of the recent simplifications of the legalizer that made it single-pass instead of iterative. This fixes JM/lencod, JM/ldecod, and CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC). llvm-svn: 26144
* Reorg for integration with gcc4. Old style debug info will not be passed thoughJim Laskey2006-02-111-24/+21
| | | | | | to SelIDAG. llvm-svn: 26115
OpenPOWER on IntegriCloud