aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix PR9210 by implementing some type legalization logic for Chris Lattner2011-02-141-14/+46
| | | | | | | vector fp conversions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125482 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX] Support EXTRACT_SUBVECTOR on x86. This provides a defaultDavid Greene2011-01-261-2/+2
| | | | | | | | | implementation of EXTRACT_SUBVECTOR for x86, going through the stack in a similr fashion to how the codegen implements BUILD_VECTOR. Eventually this will get matched to VEXTRACTF128 if AVX is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124292 91177308-0d34-0410-b5e6-96231b3b80d8
* Change EXTRACT_SUBVECTOR to require a constant index.Bob Wilson2011-01-071-32/+16
| | | | | | | | We were never generating any of these nodes with variable indices, and there was one legalizer function asserting on a non-constant index. If we ever have a need to support variable indices, we can add this back again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122993 91177308-0d34-0410-b5e6-96231b3b80d8
* Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.Wesley Peck2010-11-231-43/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119990 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Synthesizable from the Type system; as MMX vectorDale Johannesen2010-10-201-10/+10
| | | | | | | | | types are no longer Legal on X86, we don't need it. No functional change. 8499854. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116947 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to make a vector of x86mmx; this won't work,Dale Johannesen2010-09-271-2/+4
| | | | | | | | and asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114843 91177308-0d34-0410-b5e6-96231b3b80d8
* update a bunch of code to use the MachinePointerInfo version of getStore.Chris Lattner2010-09-211-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114461 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate an old SelectionDAG::getTruncStore method, propagatingChris Lattner2010-09-211-24/+20
| | | | | | | MachinePointerInfo around more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114452 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate last SelectionDAG::getLoad old entrypoint, on to stores.Chris Lattner2010-09-211-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114450 91177308-0d34-0410-b5e6-96231b3b80d8
* propagate MachinePointerInfo through various uses of the oldChris Lattner2010-09-211-7/+7
| | | | | | | SelectionDAG::getExtLoad overload, and eliminate it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114446 91177308-0d34-0410-b5e6-96231b3b80d8
* continue MachinePointerInfo'izing, eliminating use of one of the oldChris Lattner2010-09-211-13/+12
| | | | | | | getLoad overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114443 91177308-0d34-0410-b5e6-96231b3b80d8
* implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.Chris Lattner2010-08-261-66/+92
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112171 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy up, reduce indentationChris Lattner2010-08-241-117/+115
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111982 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getExtLoad() and (some) getLoad() DebugLoc argument after EVT argument ↵Evan Cheng2010-07-071-6/+7
| | | | | | for consistency sake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107820 91177308-0d34-0410-b5e6-96231b3b80d8
* Change UpdateNodeOperands' operand and return value from SDValue toDan Gohman2010-06-181-3/+4
| | | | | | | SDNode *, since it doesn't care about the ResNo value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106282 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed vector widening of binary instructions that can trap. Patch by Visa ↵Mon P Wang2010-06-151-27/+71
| | | | | | Putkinen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106038 91177308-0d34-0410-b5e6-96231b3b80d8
* Fill in missing support for ISD::FEXP, ISD::FPOWI, and friends.Dan Gohman2010-06-011-1/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105283 91177308-0d34-0410-b5e6-96231b3b80d8
* More 80 violations.Evan Cheng2010-04-151-7/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a widening bug where we were not using the correct size for the loadMon P Wang2010-03-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98920 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r97064. Duncan pointed out that bitcasts are defined inDan Gohman2010-02-251-14/+7
| | | | | | | | | terms of store and load, which means bitcasting between scalar integer and vector has endian-specific results, which undermines this whole approach. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97137 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getTypeSizeInBits work correctly for array types; it should returnDan Gohman2010-02-241-7/+14
| | | | | | | | | | | | | | | | the number of value bits, not the number of bits of allocation for in-memory storage. Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and vectors. Fix several places in CodeGen which compute offsets into in-memory vectors to use TargetData information. This fixes PR1784. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97064 91177308-0d34-0410-b5e6-96231b3b80d8
* Add non-temporal flags and remove an assumption of default arguments.David Greene2010-02-151-23/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96240 91177308-0d34-0410-b5e6-96231b3b80d8
* The previous fix of widening divides that trap was too fragile as it depends ↵Mon P Wang2010-02-101-3/+89
| | | | | | | | | | | | on custom lowering and requires that certain types exist in ValueTypes.h. Modified widening to check if an op can trap and if so, the widening algorithm will apply only the op on the defined elements. It is safer to do this in widening because the optimizer can't guarantee removing unused ops in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95823 91177308-0d34-0410-b5e6-96231b3b80d8
* It seems better to scalarize vectors of size 1 instead of widening them.Mon P Wang2010-01-241-0/+9
| | | | | | | Add support to widen SETCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94342 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved widening loads by adding support for wider loads ifMon P Wang2010-01-241-241/+361
| | | | | | | | the alignment allows. Fixed a bug where we didn't use a vector load/store for PR5626. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94338 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNodeDan Gohman2010-01-091-29/+40
| | | | | | | | | | | really does need to be a vector type, because TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type, and it needs to be able to distinguish between vectors and scalars. Also, fix some more issues with legalization of vector casts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93043 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-24/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92570 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.Dan Gohman2009-12-111-0/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91158 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to allow clients to custom widen. For X86, custom widen ↵Mon P Wang2009-11-301-1/+5
| | | | | | | | | | vectors for divide/remainder since these operations can trap by unroll them and adding undefs for the resulting vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90108 91177308-0d34-0410-b5e6-96231b3b80d8
* -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixedEvan Cheng2009-10-181-1/+2
| | | | | | | | | | | | stack slots and giving them different PseudoSourceValue's did not fix the problem of post-alloc scheduling miscompiling llvm itself. - Apply Dan's conservative workaround by assuming any non fixed stack slots can alias other memory locations. This means a load from spill slot #1 cannot move above a store of spill slot #2. - Enable post-alloc scheduling for x86 at optimization leverl Default and above. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84424 91177308-0d34-0410-b5e6-96231b3b80d8
* Only fixed stack objects and spill slots should be get FixedStack ↵Evan Cheng2009-10-181-2/+1
| | | | | | PseudoSourceValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84411 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 84315 for now. Re-thinking the patch.Evan Cheng2009-10-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getFixedStack to getStackObject. The stack objects represented are notEvan Cheng2009-10-171-1/+1
| | | | | | | necessarily fixed. Only those will negative frame indices are "fixed." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow widening of extract subvectorMon P Wang2009-10-161-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84279 91177308-0d34-0410-b5e6-96231b3b80d8
* Better solution for tracking both the original alignment of the access, and ↵Nate Begeman2009-09-151-19/+12
| | | | | | | | | the current alignment based on the source value offset. This avoids increasing the size of mem nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81897 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the legalizer to propagate the original alignment of loads and store whenNate Begeman2009-09-151-6/+11
| | | | | | | it splits them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81815 91177308-0d34-0410-b5e6-96231b3b80d8
* When widening a vector load, use the correct chain. This fixes PR4891.Dan Gohman2009-09-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81343 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate uses of cerr()Chris Lattner2009-08-231-22/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79834 91177308-0d34-0410-b5e6-96231b3b80d8
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-42/+43
| | | | | | infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-8/+8
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-126/+126
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-8/+8
| | | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-3/+3
| | | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-10/+6
| | | | | | | and abort()/exit() -> llvm_report_error(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CreateStackStoreLoad helper in more places.Eli Friedman2009-07-111-24/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75320 91177308-0d34-0410-b5e6-96231b3b80d8
* Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned Eli Friedman2009-07-091-4/+8
| | | | | | | | | | | value. Adjust other code to deal with that correctly. Make DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of this new flexibility to simplify the code and make it deal with unusual vectors (like <4 x i1>) correctly. Fixes PR3037. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75176 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
* Nowadays vectors are only split if they have an evenDuncan Sands2009-07-081-36/+13
| | | | | | | | | number of elements. Make some simplifications based on this (in particular SplitVecRes_SETCC). Tighten up some checking while there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75050 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace. Reorder some methodsDuncan Sands2009-07-081-52/+53
| | | | | | | and cases alphabetically. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75001 91177308-0d34-0410-b5e6-96231b3b80d8