summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More consts on TargetLowering references.Dan Gohman2009-01-151-1/+1
| | | | llvm-svn: 62262
* Use const with TargetLowering references in a few more places.Dan Gohman2009-01-151-4/+5
| | | | llvm-svn: 62260
* Use DebugInfo interface to lower dbg_* intrinsics.Devang Patel2009-01-131-6/+11
| | | | llvm-svn: 62127
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+3
| | | | | | suggested by Chris. llvm-svn: 62099
* Fix PR3274: when promoting the condition of a BRCOND node,Duncan Sands2009-01-011-50/+57
| | | | | | | | | | promote from i1 all the way up to the canonical SetCC type. In order to discover an appropriate type to use, pass MVT::Other to getSetCCResultType. In order to be able to do this, change getSetCCResultType to take a type as an argument, not a value (this is also more logical). llvm-svn: 61542
* Teach LeaglizeDAG that i64 mul can be a libcall.Scott Michel2008-12-291-0/+2
| | | | llvm-svn: 61463
* Clean up the atomic opcodes in SelectionDAG.Dan Gohman2008-12-231-155/+50
| | | | | | | | | | | | | This removes all the _8, _16, _32, and _64 opcodes and replaces each group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode is now used to carry the size information. In tablegen, the size-specific opcodes are replaced by size-independent opcodes that utilize the ability to compose them with predicates. This shrinks the per-opcode tables and makes the code that handles atomics much more concise. llvm-svn: 61389
* Added support for vector widening.Mon P Wang2008-12-181-31/+39
| | | | llvm-svn: 61209
* Fix expansion of vsetcc to set the high bit for true instead of 1.Mon P Wang2008-12-171-4/+6
| | | | llvm-svn: 61129
* Reapply r60997, this time without forgetting thatDuncan Sands2008-12-141-5/+12
| | | | | | | target constants are allowed to have an illegal type. llvm-svn: 61006
* Temporarily revert r60997. It was causing this failure:Bill Wendling2008-12-131-8/+5
| | | | | | | | | | | | | | | | | | | Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll | llc | /usr/bin/grep 68719476738 Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493. 0 llc 0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98 1 llc 0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593 2 libSystem.B.dylib 0x96cac09b _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1765097359 4 libSystem.B.dylib 0x96d24ec2 raise + 26 5 libSystem.B.dylib 0x96d3447f abort + 73 6 libSystem.B.dylib 0x96d26063 __assert_rtn + 101 7 llc 0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub ... llvm-svn: 61001
* LegalizeDAG is not supposed to introduce illegalDuncan Sands2008-12-131-5/+8
| | | | | | | types into the DAG if they were not already there. Check this with an assertion. llvm-svn: 60997
* Added basic support for expanding VSETCCMon P Wang2008-12-131-2/+21
| | | | llvm-svn: 60974
* On big-endian machines it is wrong to do a fullDuncan Sands2008-12-131-19/+22
| | | | | | | | | | width register load followed by a truncating store for the copy, since the load will not place the value in the lower bits. Probably partial loads/stores can never happen here, but fix it anyway. llvm-svn: 60972
* When expanding unaligned loads and stores do not makeDuncan Sands2008-12-121-34/+123
| | | | | | | | | | | | | | | | | | | | | | | | use of illegal integer types: instead, use a stack slot and copying via integer registers. The existing code is still used if the bitconvert is to a legal integer type. This fires on the PPC testcases 2007-09-08-unaligned.ll and vec_misaligned.ll. It looks like equivalent code is generated with these changes, just permuted, but it's hard to tell. With these changes, nothing in LegalizeDAG produces illegal integer types anymore. This is a prerequisite for removing the LegalizeDAG type legalization code. While there I noticed that the existing code doesn't handle trunc store of f64 to f32: it turns this into an i64 store, which represents a 4 byte stack smash. I added a FIXME about this. Hopefully someone more motivated than I am will take care of it. llvm-svn: 60964
* Fix add/sub expansion: don't create ADD / SUB with two results (seems like ↵Evan Cheng2008-12-121-5/+5
| | | | | | everyone is doing this these days :-). Patch by Daniel M Gessel! llvm-svn: 60958
* When using a 4 byte jump table on a 64 bit machine,Duncan Sands2008-12-121-11/+3
| | | | | | | | do an extending load of the 4 bytes rather than a potentially illegal (type) i32 load followed by a sign extend. llvm-svn: 60945
* Added support for SELECT v8i8 v4i16 for X86 (MMX)Mon P Wang2008-12-121-0/+4
| | | | | | Added support for TRUNC v8i16 to v8i8 for X86 (MMX) llvm-svn: 60916
* Whitespace clean up (tabs with spaces)Mon P Wang2008-12-111-8/+8
| | | | llvm-svn: 60866
* Whitespace changes.Bill Wendling2008-12-101-1/+1
| | | | llvm-svn: 60826
* Add sub/mul overflow intrinsics. This currently doesn't have aBill Wendling2008-12-091-7/+39
| | | | | | | target-independent way of determining overflow on multiplication. It's very tricky. Patch by Zoltan Varga! llvm-svn: 60800
* In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promotingMon P Wang2008-12-091-2/+2
| | | | | | one of its operand. llvm-svn: 60749
* Fix getNode to allow a vector for the shift amount for shifts of vectors.Mon P Wang2008-12-091-7/+29
| | | | | | | | Fix the shift amount when unrolling a vector shift into scalar shifts. Fix problem in getShuffleScalarElt where it assumes that the input of a bit convert must be a vector. llvm-svn: 60740
* Non-functional change: make custom lowering for truncate stylisticallyScott Michel2008-12-021-5/+12
| | | | | | consistent with the way it's generally done in other places. llvm-svn: 60439
* make it possible to custom lower TRUNCATE (needed for the CellSPU target)Tilmann Scheller2008-12-021-0/+5
| | | | llvm-svn: 60409
* Removed some unnecessary code in widening.Mon P Wang2008-12-021-115/+9
| | | | llvm-svn: 60406
* There are no longer any places that require aDuncan Sands2008-12-011-2/+4
| | | | | | | | MERGE_VALUES node with only one operand, so get rid of special code that only existed to handle that possibility. llvm-svn: 60349
* Change the interface to the type legalization methodDuncan Sands2008-12-011-2/+4
| | | | | | | | | | | ReplaceNodeResults: rather than returning a node which must have the same number of results as the original node (which means mucking around with MERGE_VALUES, and which is also easy to get wrong since SelectionDAG folding may mean you don't get the node you expect), return the results in a vector. llvm-svn: 60348
* Removing redundant semicolons. No functionality change.Sanjiv Gupta2008-11-271-2/+2
| | | | llvm-svn: 60149
* Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.Sanjiv Gupta2008-11-261-6/+36
| | | | llvm-svn: 60102
* A simplification for checking whether the signs of the operands and sum ↵Bill Wendling2008-11-251-15/+14
| | | | | | differ. Thanks, Duncan. llvm-svn: 60043
* Now with the correct type for the 0.Bill Wendling2008-11-251-1/+1
| | | | llvm-svn: 60016
* Get rid of unused variable.Bill Wendling2008-11-251-1/+0
| | | | llvm-svn: 60015
* Hacker's Delight says, "Signed integer overflow of addition occurs if and onlyBill Wendling2008-11-251-4/+48
| | | | | | | if the operands have the same sign and the sum has sign opposite to that of the operands." llvm-svn: 60014
* - Make lowering of "add with overflow" customizable by back-ends.Bill Wendling2008-11-241-16/+28
| | | | | | | - Mark "add with overflow" as having a custom lowering for X86. Give it a null lowering representation for now. llvm-svn: 59971
* Eliminate some unused variable compile time warnings.Evan Cheng2008-11-241-0/+5
| | | | llvm-svn: 59952
* Add support for llvm.uadd.with.overflow.Bill Wendling2008-11-241-5/+5
| | | | llvm-svn: 59926
* - Move conversion of [SU]ADDO from DAG combiner into legalizer.Bill Wendling2008-11-221-0/+21
| | | | | | - Add "promote integer type" stuff to the legalizer for these nodes. llvm-svn: 59847
* Add missing widen operations, fixed widening for extracting a subvector,Mon P Wang2008-11-151-16/+44
| | | | | | | and when loading/storing a widen vector, make sure that they are loaded and stored in consecutive order. llvm-svn: 59357
* Added CONVERT_RNDSAT (conversion with rounding and saturation) SDNode toMon P Wang2008-11-101-1/+122
| | | | | | | support targets that support these conversions. Users should avoid using this node as the current targets don't generating code for it. llvm-svn: 59001
* Added support for the following definition of shufflevector Mon P Wang2008-11-101-5/+23
| | | | | | <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> llvm-svn: 58964
* Make FP tests requiring two compares work on PPC (PR 642).Dale Johannesen2008-11-071-2/+2
| | | | | | | | | | This is Chris' patch from the PR, modified to realize that SETUGT/SETULT occur legitimately with integers, plus two fixes in LegalizeDAG to pass a valid result type into LegalizeSetCC. The argument of TLI.getSetCCResultType is ignored on PPC, but I think I'm following usage elsewhere. llvm-svn: 58871
* Fixed scalarizing an extract subvector and prevent an infinite loopMon P Wang2008-11-061-3/+3
| | | | | | when simplify a vector. llvm-svn: 58820
* Widening cleanupMon P Wang2008-11-061-15/+13
| | | | llvm-svn: 58796
* 80 columnsDale Johannesen2008-11-041-2/+2
| | | | llvm-svn: 58717
* Make VAARG work with x86 long double (which isDuncan Sands2008-11-031-3/+3
| | | | | | 10 bytes long, but is passed in 12/16 bytes). llvm-svn: 58608
* Add missing vsetcc expansion for wideningMon P Wang2008-10-301-1/+12
| | | | llvm-svn: 58443
* Add initial support for vector widening. Logic is set to widen for X86.Mon P Wang2008-10-301-27/+847
| | | | | | | One will only see an effect if legalizetype is not active. Will move support to LegalizeType soon. llvm-svn: 58426
* Add an SSE2 algorithm for uint64->f64 conversion.Dale Johannesen2008-10-211-0/+16
| | | | | | | | | | The same one Apple gcc uses, faster. Also gets the extreme case in gcc.c-torture/execute/ieee/rbug.c correct which we weren't before; this is not sufficient to get the test to pass though, there is another bug. llvm-svn: 57926
* Make the NaN test come second, heuristically assumingDan Gohman2008-10-211-12/+12
| | | | | | that NaNs are less common. llvm-svn: 57871
OpenPOWER on IntegriCloud