summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add new TargetLowering code to provide the final register type that anDan Gohman2007-06-281-95/+67
| | | | | | | | | | | | illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. llvm-svn: 37781
* Generalize MVT::ValueType and associated functions to be able to representDan Gohman2007-06-251-23/+29
| | | | | | | | | | | | | | | extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. llvm-svn: 37719
* Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits fromDan Gohman2007-06-221-553/+8
| | | | | | | | | TargetLowering to SelectionDAG so that they have more convenient access to the current DAG, in preparation for the ValueType routines being changed from standalone functions to members of SelectionDAG for the pre-legalize vector type changes. llvm-svn: 37704
* Tidy up ValueType names in comments.Dan Gohman2007-06-211-3/+3
| | | | llvm-svn: 37688
* Rename TargetLowering::getNumElements and friends toDan Gohman2007-06-211-5/+5
| | | | | | | TargetLowering::getNumRegisters and similar, to avoid confusion with the actual number of elements for vector types. llvm-svn: 37687
* Fix CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll, and PR1473.Chris Lattner2007-05-301-1/+1
| | | | llvm-svn: 37362
* same patch as the previous one, but the symmetric caseChris Lattner2007-05-191-1/+1
| | | | llvm-svn: 37249
* Disable the (A == (B-A)) -> 2*A == B xform when the sub has multiple uses (inChris Lattner2007-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | this case, the xform introduces an extra operation). This compiles PowerPC/compare-duplicate.ll into: _test: subf r2, r3, r4 cmplw cr0, r2, r3 bne cr0, LBB1_2 ;F instead of: _test: slwi r2, r3, 1 subf r3, r3, r4 cmplw cr0, r4, r2 bne cr0, LBB1_2 ;F This is target independent of course. llvm-svn: 37246
* Qualify several calls to functions in the MVT namespace, for consistency.Dan Gohman2007-05-181-2/+2
| | | | llvm-svn: 37230
* disable MaskedValueIsZero, ComputeMaskedBits, and SimplifyDemandedBits forChris Lattner2007-05-171-0/+13
| | | | | | | i128 integers. The 64-bit masks are not wide enough to represent the results. These should be converted to APInt someday. llvm-svn: 37169
* Add target hook to specify block size limit for if-conversion.Evan Cheng2007-05-161-0/+1
| | | | llvm-svn: 37134
* Allow i/s to match (gv+c). This fixes ↵Chris Lattner2007-05-031-10/+31
| | | | | | | | CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll and PR1382 llvm-svn: 36672
* fix a pastoChris Lattner2007-04-181-1/+1
| | | | llvm-svn: 36242
* Fix a bug in my previous patch, grabbing the shift amount width from theChris Lattner2007-04-171-2/+2
| | | | | | wrong operand. llvm-svn: 36223
* Fold (x << c1)>> c2 into a single shift if the bits shifted out aren't used.Chris Lattner2007-04-171-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiles: int baz(long long a) { return (short)(((int)(a >>24)) >> 9); } into: _baz: srwi r2, r3, 1 extsh r3, r2 blr on PPC, instead of: _baz: slwi r2, r3, 8 srwi r2, r2, 9 extsh r3, r2 blr GCC produces: _baz: srwi r10,r4,24 insrwi r10,r3,24,0 srawi r9,r3,24 srawi r3,r10,9 extsh r3,r3 blr This implements CodeGen/PowerPC/shl_elim.ll llvm-svn: 36221
* Removed tabs everywhere except autogenerated & external files. Add makeAnton Korobeynikov2007-04-161-2/+2
| | | | | | target for tabs checking. llvm-svn: 36146
* Fix weirdness handling single element vectors.Chris Lattner2007-04-121-5/+2
| | | | llvm-svn: 35941
* remove dead target hooks.Chris Lattner2007-04-091-19/+0
| | | | llvm-svn: 35847
* remove some dead target hooks, subsumed by isLegalAddressingModeChris Lattner2007-04-091-17/+0
| | | | llvm-svn: 35840
* switch TL::getValueType to use MVT::getValueType.Chris Lattner2007-03-311-22/+0
| | | | llvm-svn: 35527
* add one addressing mode description hook to rule them all.Chris Lattner2007-03-301-0/+34
| | | | llvm-svn: 35520
* Remove isLegalAddressImmediate.Evan Cheng2007-03-281-8/+0
| | | | llvm-svn: 35406
* implement initial support for the silly X constraint. Testcase here: ↵Chris Lattner2007-03-251-0/+2
| | | | | | CodeGen/X86/2007-03-24-InlineAsmXConstraint.ll llvm-svn: 35327
* Implement CodeGen/X86/2007-03-24-InlineAsmMultiRegConstraint.llChris Lattner2007-03-251-1/+4
| | | | llvm-svn: 35324
* switch TargetLowering::getConstraintType to take the entire constraint,Chris Lattner2007-03-251-20/+24
| | | | | | not just the first letter. No functionality change. llvm-svn: 35322
* repair x86 performance, dejagnu problems from previous changeDale Johannesen2007-03-211-2/+2
| | | | llvm-svn: 35245
* do not share old induction variables when this would result in invalidDale Johannesen2007-03-201-0/+16
| | | | | | instructions (that would have to be split later) llvm-svn: 35227
* Added isLegalAddressExpression hook to test if the given expression can beEvan Cheng2007-03-161-0/+8
| | | | | | folded into target addressing mode for the given type. llvm-svn: 35121
* More flexible TargetLowering LSR hooks for testing whether an immediate is a ↵Evan Cheng2007-03-121-3/+13
| | | | | | legal target address immediate or scale. llvm-svn: 35076
* initialize a instance variableChris Lattner2007-02-251-0/+1
| | | | llvm-svn: 34567
* Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219Chris Lattner2007-02-241-2/+2
| | | | llvm-svn: 34551
* Need to init.Jim Laskey2007-02-221-0/+2
| | | | llvm-svn: 34499
* Implement i/n/s constraints correctly. This fixesChris Lattner2007-02-171-2/+16
| | | | | | test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll llvm-svn: 34368
* For PR1195:Reid Spencer2007-02-151-3/+3
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.Chris Lattner2007-02-131-0/+1
| | | | llvm-svn: 34256
* Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.Evan Cheng2007-02-081-0/+421
| | | | llvm-svn: 34065
* Fit in 80 columnsChris Lattner2007-02-011-1/+1
| | | | llvm-svn: 33745
* Allow the target to override the ISD::CondCode that's to be used to test theEvan Cheng2007-01-311-0/+25
| | | | | | result of the comparison libcall against zero. llvm-svn: 33701
* Move a function out of line.Reid Spencer2007-01-121-0/+21
| | | | llvm-svn: 33158
* Minor fix.Evan Cheng2007-01-121-1/+1
| | | | llvm-svn: 33149
* Store default libgcc routine names and allow them to be redefined by target.Evan Cheng2007-01-121-0/+77
| | | | llvm-svn: 33105
* Cleaned setjmp/longjmp lowering interfaces. Now we're producing rightAnton Korobeynikov2006-12-101-1/+2
| | | | | | | code (both asm & cbe) for Mingw32 target. Removed autoconf checks for underscored versions of setjmp/longjmp. llvm-svn: 32415
* Preliminary soft float support.Evan Cheng2006-12-091-12/+31
| | | | llvm-svn: 32394
* Fix the dag combiner bug corresponding to PR1014.Chris Lattner2006-11-271-8/+8
| | | | llvm-svn: 31943
* Add a mechanism to specify whether a target supports a particular indexed ↵Evan Cheng2006-11-091-0/+8
| | | | | | load / store. llvm-svn: 31597
* For PR786:Reid Spencer2006-11-021-2/+0
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Change the prototype for TargetLowering::isOperandValidForConstraintChris Lattner2006-10-311-5/+8
| | | | llvm-svn: 31318
* Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.Evan Cheng2006-10-131-0/+1
| | | | llvm-svn: 30945
* Naming consistency.Evan Cheng2006-10-111-4/+4
| | | | llvm-svn: 30878
* Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.Evan Cheng2006-10-091-9/+12
| | | | llvm-svn: 30844
OpenPOWER on IntegriCloud