summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fold adds and subtracts of zero immediately, instead of waitingDan Gohman2008-06-021-4/+4
| | | | | | for dagcombine to do this. llvm-svn: 51886
* Remove an unused variable.Dan Gohman2008-05-311-1/+0
| | | | llvm-svn: 51807
* Expand small memmovs using inline code. Set the X86 threshold for expandingDan Gohman2008-05-291-5/+73
| | | | | | memmove to a more plausible value, now that it's actually being used. llvm-svn: 51696
* Implement vector shift up / down and insert zero with ps{rl}lq / ps{rl}ldq.Evan Cheng2008-05-291-3/+10
| | | | llvm-svn: 51667
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-271-1/+1
| | | | llvm-svn: 51591
* Generalize the new code in instcombine's ComputeNumSignBits for handlingDan Gohman2008-05-231-7/+13
| | | | | | | and/or to handle more cases (such as this add-sitofp.ll testcase), and port it to selectiondag's ComputeNumSignBits. llvm-svn: 51469
* Port the fix for the select operator from instcombine'sDan Gohman2008-05-201-2/+2
| | | | | | ComputeNumSignBits to SelectionDAG's ComputeNumSignBits. llvm-svn: 51348
* Make use of vector load and store operations to implement memcpy, memmove, ↵Evan Cheng2008-05-151-90/+135
| | | | | | and memset. Currently only X86 target is taking advantage of these. llvm-svn: 51140
* When bit-twiddling CondCode values for integer comparisons producesDan Gohman2008-05-141-0/+1
| | | | | | SETOEQ, is it does with (SETEQ & SETULE), map it to SETEQ. llvm-svn: 51112
* Instead of a vector load, shuffle and then extract an element. Load the ↵Evan Cheng2008-05-131-0/+22
| | | | | | | | | | | element from address with an offset. pshufd $1, (%rdi), %xmm0 movd %xmm0, %eax => movl 4(%rdi), %eax llvm-svn: 51026
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-1/+1
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Add support for vicmp/vfcmp codegen, more legalize support coming.Nate Begeman2008-05-121-0/+1
| | | | | | This is necessary to unbreak the build. llvm-svn: 50988
* Fix a bug in the ComputeMaskedBits logic for multiply.Dan Gohman2008-05-071-2/+2
| | | | llvm-svn: 50793
* Correct the value of LowBits in srem and urem handling inDan Gohman2008-05-061-3/+3
| | | | | | ComputeMaskedBits. llvm-svn: 50692
* Added addition atomic instrinsics and, or, xor, min, and max.Mon P Wang2008-05-051-2/+14
| | | | llvm-svn: 50663
* Fix a mistake in the computation of leading zeros for udiv.Dan Gohman2008-05-021-3/+5
| | | | llvm-svn: 50591
* Fix a typo in a comment.Dan Gohman2008-05-021-1/+1
| | | | llvm-svn: 50562
* Fix the SVOffset values for loads and stores produced byDan Gohman2008-04-281-18/+20
| | | | | | | memcpy/memset expansion. It was a bug for the SVOffset value to be used in the actual address calculations. llvm-svn: 50359
* Teach InstCombine's ComputeMaskedBits what SelectionDAG'sDan Gohman2008-04-281-33/+124
| | | | | | | | | | | ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach SelectionDAG's ComputeMaskedBits what InstCombine's knows about SRem. And teach them both some things about high bits in Mul, UDiv, URem, and Sub. This allows instcombine and dagcombine to eliminate sign-extension operations in several new cases. llvm-svn: 50358
* Check we aren't trying to convert PPC long double.Dale Johannesen2008-04-201-6/+3
| | | | | | This fixes the testsuite failure on ppcf128-4.ll. llvm-svn: 49994
* Remove the implicit conversion from SDOperandPtr to SDOperand*; thisDan Gohman2008-04-171-4/+4
| | | | | | may fix a build error on Visual Studio. llvm-svn: 49876
* Ongoing work on improving the instruction selection infrastructure:Roman Levenstein2008-04-161-50/+50
| | | | | | | | | | Rename SDOperandImpl back to SDOperand. Introduce the SDUse class that represents a use of the SDNode referred by an SDOperand. Now it is more similar to Use/Value classes. Patch is approved by Dan Gohman. llvm-svn: 49795
* Avoid creating MERGE_VALUES nodes for single values.Dan Gohman2008-04-141-1/+2
| | | | llvm-svn: 49676
* Fix const-correctness issues with the SrcValue handling in theDan Gohman2008-04-141-8/+8
| | | | | | memory intrinsic expansion code. llvm-svn: 49666
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-121-22/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
* detabifyGabor Greif2008-04-111-1/+1
| | | | llvm-svn: 49524
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-071-10/+11
| | | | | | | review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
* Re-commit of the r48822, where the infinite looping problem discoveredRoman Levenstein2008-04-071-70/+84
| | | | | | by Dan Gohman is fixed. llvm-svn: 49330
* Backing out 48222 temporarily.Evan Cheng2008-04-031-99/+70
| | | | llvm-svn: 49124
* Rename getAnyLoad to getLoad is suggested by Evan.Duncan Sands2008-03-281-13/+13
| | | | llvm-svn: 48914
* Implement LegalizeTypes support for softfloat LOAD.Duncan Sands2008-03-271-78/+52
| | | | | | | | In order to handle indexed nodes I had to introduce a new constructor, and since I was there I factorized the code in the various load constructors. llvm-svn: 48894
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-261-70/+99
| | | | | | | | | | | | | LLVM Value/Use does and MachineRegisterInfo/MachineOperand does. This allows constant time for all uses list maintenance operations. The idea was suggested by Chris. Reviewed by Evan and Dan. Patch is tested and approved by Dan. On normal use-cases compilation speed is not affected. On very big basic blocks there are compilation speedups in the range of 15-20% or even better. llvm-svn: 48822
* Handle a special case xor undef, undef -> 0. Technically this should be ↵Evan Cheng2008-03-251-1/+6
| | | | | | transformed to undef. But this is such a common idiom (misuse) we are going to handle it. llvm-svn: 48792
* APIntify SelectionDAG's EXTRACT_ELEMENT code.Dan Gohman2008-03-241-2/+4
| | | | llvm-svn: 48726
* Another comments fixingAnton Korobeynikov2008-03-221-1/+1
| | | | llvm-svn: 48683
* Teach DAG combiner to commute commutable binary nodes in order to achieve ↵Evan Cheng2008-03-221-0/+14
| | | | | | sdisel CSE. llvm-svn: 48673
* Introduce a new node for holding call argumentDuncan Sands2008-03-211-0/+44
| | | | | | | | | | | | | | | | | flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. llvm-svn: 48640
* More APInt-ification.Dan Gohman2008-03-131-3/+3
| | | | llvm-svn: 48344
* Don't try to extract an i32 from an f64. ThisDuncan Sands2008-03-121-2/+6
| | | | | | | | | | | | getCopyToParts problem was noticed by the new LegalizeTypes infrastructure. In order to avoid this kind of thing in the future I've added a check that EXTRACT_ELEMENT is only used with integers. Once LegalizeTypes is up and running most likely BUILD_PAIR and EXTRACT_ELEMENT can be removed, in favour of using apints instead. llvm-svn: 48294
* Correctly propagate thread-local flag from aliasee to alias. This fixes PR2137Anton Korobeynikov2008-03-111-1/+10
| | | | llvm-svn: 48257
* compile: double test() {}Chris Lattner2008-03-111-1/+3
| | | | | | | | | | | | | | | | | | | | into: _test: fldz ret instead of: _test: subl $12, %esp #IMPLICIT_DEF %xmm0 movsd %xmm0, (%esp) fldl (%esp) addl $12, %esp ret llvm-svn: 48213
* Teach SD some vector identities, allowing us to compile vec_set-9 into:Chris Lattner2008-03-081-1/+13
| | | | | | | | | | | | | | | | | | | | | _test3: movd %rdi, %xmm1 #IMPLICIT_DEF %xmm0 punpcklqdq %xmm1, %xmm0 ret instead of: _test3: #IMPLICIT_DEF %rax movd %rax, %xmm0 movd %rdi, %xmm1 punpcklqdq %xmm1, %xmm0 ret This is still not ideal. There is no reason to two xmm regs. llvm-svn: 48058
* Implement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} ↵Evan Cheng2008-03-081-0/+1
| | | | | | and prefetchnta instructions. llvm-svn: 48042
* 80 col violation.Evan Cheng2008-03-061-2/+4
| | | | llvm-svn: 47998
* Constant fold SIGN_EXTEND_INREG with ashr not lshr.Evan Cheng2008-03-061-1/+1
| | | | llvm-svn: 47992
* Generalize FP constant shrinking optimization to apply to any vtChris Lattner2008-03-051-26/+25
| | | | | | | | except ppc long double. This allows us to shrink constant pool entries for x86 long double constants, which in turn allows us to use flds/fldl instead of fldt. llvm-svn: 47938
* Rename isOperand() to isOperandOf() (and other similar methods). It always ↵Evan Cheng2008-03-041-6/+6
| | | | | | confuses me. llvm-svn: 47872
* More APInt-ification.Dan Gohman2008-03-031-10/+6
| | | | llvm-svn: 47868
* More APInt-ification.Dan Gohman2008-02-291-107/+42
| | | | llvm-svn: 47746
* Convert the last remaining users of the non-APInt form ofDan Gohman2008-02-271-35/+15
| | | | | | | ComputeMaskedBits to use the APInt form, and remove the non-APInt form. llvm-svn: 47654
OpenPOWER on IntegriCloud