summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* implement legalization of build_pair for nateChris Lattner2005-03-281-0/+8
| | | | llvm-svn: 20901
* Change interface to LowerCallTo to take a boolean isVarArg argument.Nate Begeman2005-03-261-3/+3
| | | | llvm-svn: 20842
* Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.Chris Lattner2005-02-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing 'op' here caused us to not enter the store into a map, causing reemission of the code!! In practice, a simple loop like this: no_exit: ; preds = %no_exit, %entry %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3] %tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1] store double 0.000000e+00, double* %tmp.4 %indvar.next = add uint %indvar, 1 ; <uint> [#uses=2] %exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1] br bool %exitcond, label %return, label %no_exit was being code gen'd to: .LBBtest_1: # no_exit movl %edx, %esi shll $4, %esi movl $0, 4(%eax,%esi) movl $0, (%eax,%esi) incl %edx movl $0, (%eax,%esi) movl $0, 4(%eax,%esi) cmpl %ecx, %edx jne .LBBtest_1 # no_exit Note that we are doing 4 32-bit stores instead of 2. Now we generate: .LBBtest_1: # no_exit movl %edx, %esi incl %esi shll $4, %edx movl $0, (%eax,%edx) movl $0, 4(%eax,%edx) cmpl %ecx, %esi movl %esi, %edx jne .LBBtest_1 # no_exit This is much happier, though it would be even better if the increment of ESI was scheduled after the compare :-/ llvm-svn: 20265
* Fix a case where were incorrectly compiled cast from short to int on 64-bitChris Lattner2005-02-041-2/+4
| | | | | | targets. llvm-svn: 20030
* Fix yet another memset issue.Chris Lattner2005-02-021-4/+13
| | | | llvm-svn: 19986
* Fix some bugs andrew noticed legalizing memset for alphaChris Lattner2005-02-011-3/+3
| | | | llvm-svn: 19969
* Alpha doesn't have a native f32 extload instruction.Chris Lattner2005-01-281-1/+5
| | | | llvm-svn: 19880
* implement legalization of truncates whose results and sources need to beChris Lattner2005-01-281-2/+5
| | | | | | truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC. llvm-svn: 19879
* Get alpha working with memset/memcpy/memmoveChris Lattner2005-01-281-5/+29
| | | | llvm-svn: 19878
* CopyFromReg produces two values. Make sure that we remember that both areChris Lattner2005-01-281-1/+8
| | | | | | legalized, and actually return the correct result when we legalize the chain first. llvm-svn: 19866
* Silence optimized warnings.Chris Lattner2005-01-231-1/+1
| | | | llvm-svn: 19797
* Adjust to changes in SelectionDAG interfacesChris Lattner2005-01-231-9/+119
| | | | | | | The first half of correct chain insertion for libcalls. This is not enough to fix Fhourstones yet though. llvm-svn: 19781
* Fix problems with non-x86 targets.Chris Lattner2005-01-221-3/+3
| | | | llvm-svn: 19738
* Refactor libcall code a bit. Initial implementation of expanding int -> FPChris Lattner2005-01-211-50/+121
| | | | | | operations for 64-bit integers. llvm-svn: 19724
* Simplify the shift-expansion code.Chris Lattner2005-01-201-8/+7
| | | | llvm-svn: 19721
* Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.Chris Lattner2005-01-201-2/+41
| | | | llvm-svn: 19715
* Add support for targets that pass args in registers to calls.Chris Lattner2005-01-191-6/+25
| | | | llvm-svn: 19703
* Fold single use token factor nodes into other token factor nodes.Chris Lattner2005-01-191-2/+10
| | | | llvm-svn: 19701
* Realize the individual pieces of an expanded copytoreg/store/load areChris Lattner2005-01-191-9/+16
| | | | | | independent of each other. llvm-svn: 19700
* Implement a way of expanding shifts. This applies to targets that offerChris Lattner2005-01-191-3/+94
| | | | | | | | select operations or to shifts that are by a constant. This automatically implements (with no special code) all of the special cases for shift by 32, shift by < 32 and shift by > 32. llvm-svn: 19679
* Zero is cheaper than sign extend.Chris Lattner2005-01-181-1/+1
| | | | llvm-svn: 19675
* Fix some fixmes (promoting bools for select and brcond), fix promotionChris Lattner2005-01-181-8/+43
| | | | | | of zero and sign extends. llvm-svn: 19671
* Teach legalize to promote copy(from|to)reg, instead of making the isel passChris Lattner2005-01-181-5/+12
| | | | | | | | | do it. This results in better code on X86 for floats (because if strict precision is not required, we can elide some more expensive double -> float conversions like the old isel did), and allows other targets to emit CopyFromRegs that are not legal for arguments. llvm-svn: 19668
* Teach legalize to promote SetCC results.Chris Lattner2005-01-181-0/+8
| | | | llvm-svn: 19657
* Allow setcc operations to have nonbool types.Chris Lattner2005-01-181-7/+9
| | | | llvm-svn: 19656
* Implement legalize of call nodes.Chris Lattner2005-01-161-3/+17
| | | | llvm-svn: 19617
* Revamp supported ops. Instead of just being supported or not, we now keepChris Lattner2005-01-161-11/+54
| | | | | | | | | | track of how to deal with it, and provide the target with a hook that they can use to legalize arbitrary operations in arbitrary ways. Implement custom lowering for a couple of ops, implement promotion for select operations (which x86 needs). llvm-svn: 19613
* Implement some more missing promotions.Chris Lattner2005-01-161-8/+19
| | | | llvm-svn: 19606
* Clarify assertion.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19597
* Move some information into the TargetLowering object.Chris Lattner2005-01-161-56/+5
| | | | llvm-svn: 19583
* legalize a bunch of operations that I missed.Chris Lattner2005-01-161-9/+19
| | | | llvm-svn: 19580
* Fix some serious bugs in promotion.Chris Lattner2005-01-161-2/+2
| | | | llvm-svn: 19578
* Implement promotion of a whole bunch more operators. I think that this isChris Lattner2005-01-151-12/+174
| | | | | | basically everything. llvm-svn: 19576
* Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, andChris Lattner2005-01-151-21/+58
| | | | | | ZERO_EXTEND_INREG for targets that don't support them. llvm-svn: 19573
* Add support for promoting ADD/MUL.Chris Lattner2005-01-151-0/+66
| | | | | | | | Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators. Realize that if we do any promotions, we need to iterate SelectionDAG construction. llvm-svn: 19569
* Add intitial support for promoting some operators.Chris Lattner2005-01-151-7/+119
| | | | llvm-svn: 19565
* Adjust to CopyFromReg changes, implement deletion of truncating/extendingChris Lattner2005-01-141-4/+13
| | | | | | stores/loads. llvm-svn: 19562
* Start implementing truncating stores and extending loads.Chris Lattner2005-01-141-7/+5
| | | | llvm-svn: 19559
* Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.Chris Lattner2005-01-131-4/+8
| | | | llvm-svn: 19535
* Legalize new node, add assertion.Chris Lattner2005-01-131-0/+16
| | | | llvm-svn: 19527
* Fix sign extend to long. When coming from sbyte, we used to generate:Chris Lattner2005-01-121-2/+2
| | | | | | | | | | | | | | | | movsbl 4(%esp), %eax movl %eax, %edx sarl $7, %edx Now we generate: movsbl 4(%esp), %eax movl %eax, %edx sarl $31, %edx Which is right. llvm-svn: 19515
* Shut up warnings with GCC 3.4.3 about uninitialized variables.Reid Spencer2005-01-121-2/+1
| | | | llvm-svn: 19512
* Squelch optimized warning.Chris Lattner2005-01-111-0/+1
| | | | llvm-svn: 19475
* Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the targetChris Lattner2005-01-111-7/+52
| | | | | | does not support them. llvm-svn: 19465
* Lower to the correct functions. This fixes FreeBench/fourinarowChris Lattner2005-01-101-2/+2
| | | | llvm-svn: 19436
* Fix a bug legalizing call instructions (make sure to remember all resultChris Lattner2005-01-091-16/+10
| | | | | | values), and eliminate some switch statements. llvm-svn: 19417
* Fix a minor bug legalizing dynamic_stackalloc. This allows us to compileChris Lattner2005-01-091-0/+2
| | | | | | | | std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool) from libstdc++ llvm-svn: 19416
* Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)Chris Lattner2005-01-091-1/+16
| | | | llvm-svn: 19415
* Tighten up assertions.Chris Lattner2005-01-081-8/+6
| | | | llvm-svn: 19397
* Silence VS warnings.Chris Lattner2005-01-081-2/+0
| | | | llvm-svn: 19384
OpenPOWER on IntegriCloud