summaryrefslogtreecommitdiff
path: root/lib/CodeGen
Commit message (Collapse)AuthorAge
...
* Scalarized vector stores need not be legal, e.g. if the vector element typeChris Lattner2006-03-31
| | | | | | | | needs to be promoted or expanded. Relegalize the scalar store once created. This fixes CodeGen/Generic/vector.ll:test1 on non-SSE x86 targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27293 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to pass enough values to phi nodes when we are dealing withChris Lattner2006-03-31
| | | | | | | decimated vectors. This fixes UnitTests/Vector/sumarray-dbl.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27280 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly improve handling of vectors that are live across basic blocks,Chris Lattner2006-03-31
| | | | | | | | handling cases where the vector elements need promotion, expansion, and when the vector type itself needs to be decimated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27278 91177308-0d34-0410-b5e6-96231b3b80d8
* Was returning the wrong type.Chris Lattner2006-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27277 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand INSERT_VECTOR_ELT to store vec, sp; store elt, sp+k; vec = load sp;Evan Cheng2006-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27274 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the TargetLowering::getPackedTypeBreakdown method to also return theChris Lattner2006-03-31
| | | | | | | unpromoted element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27273 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement TargetLowering::getPackedTypeBreakdownChris Lattner2006-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27270 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fixes: handle constantexpr insert/extract element operationsChris Lattner2006-03-29
| | | | | | | | | Handle constantpacked vectors with constantexpr elements. This fixes CodeGen/Generic/vector-constantexpr.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27241 91177308-0d34-0410-b5e6-96231b3b80d8
* When building a VVECTOR_SHUFFLE node from extract_element operations, makeChris Lattner2006-03-28
| | | | | | | | | | | | | | | | | | | sure to build it as SHUFFLE(X, undef, mask), not SHUFFLE(X, X, mask). The later is not canonical form, and prevents the PPC splat pattern from matching. For a particular splat, we go from generating this: li r10, lo16(LCPI1_0) lis r11, ha16(LCPI1_0) lvx v3, r11, r10 vperm v3, v2, v2, v3 to generating: vspltw v3, v2, 3 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27236 91177308-0d34-0410-b5e6-96231b3b80d8
* Canonicalize VECTOR_SHUFFLE(X, X, Y) -> VECTOR_SHUFFLE(X,undef,Y')Chris Lattner2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27235 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn a series of extract_element's feeding a build_vector into aChris Lattner2006-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vector_shuffle node. For this: void test(__m128 *res, __m128 *A, __m128 *B) { *res = _mm_unpacklo_ps(*A, *B); } we now produce this code: _test: movl 8(%esp), %eax movaps (%eax), %xmm0 movl 12(%esp), %eax unpcklps (%eax), %xmm0 movl 4(%esp), %eax movaps %xmm0, (%eax) ret instead of this: _test: subl $76, %esp movl 88(%esp), %eax movaps (%eax), %xmm0 movaps %xmm0, (%esp) movaps %xmm0, 32(%esp) movss 4(%esp), %xmm0 movss 32(%esp), %xmm1 unpcklps %xmm0, %xmm1 movl 84(%esp), %eax movaps (%eax), %xmm0 movaps %xmm0, 16(%esp) movaps %xmm0, 48(%esp) movss 20(%esp), %xmm0 movss 48(%esp), %xmm2 unpcklps %xmm0, %xmm2 unpcklps %xmm1, %xmm2 movl 80(%esp), %eax movaps %xmm2, (%eax) addl $76, %esp ret GCC produces this (with -fomit-frame-pointer): _test: subl $12, %esp movl 20(%esp), %eax movaps (%eax), %xmm0 movl 24(%esp), %eax unpcklps (%eax), %xmm0 movl 16(%esp), %eax movaps %xmm0, (%eax) addl $12, %esp ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27233 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes.Chris Lattner2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27232 91177308-0d34-0410-b5e6-96231b3b80d8
* new nodeChris Lattner2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27231 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't crash on X^X if X is a vector. Instead, produce a vector of zeros.Chris Lattner2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27229 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertionChris Lattner2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27228 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor address attributes. Add base register to frame info.Jim Laskey2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27226 91177308-0d34-0410-b5e6-96231b3b80d8
* More bulletproofing of llvm.dbg.declare.Jim Laskey2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27224 91177308-0d34-0410-b5e6-96231b3b80d8
* More bulletproofing of DebugInfoDesc verify.Jim Laskey2006-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27203 91177308-0d34-0410-b5e6-96231b3b80d8
* Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum ↵Chris Lattner2006-03-28
| | | | | | value. Split them into separate enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27201 91177308-0d34-0410-b5e6-96231b3b80d8
* Reactivate llvm.dbg.declare.Jim Laskey2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27192 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable dbg_declare, it currently breaks the CFE buildChris Lattner2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27182 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix legalization of intrinsics with chain and result valuesChris Lattner2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27181 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build on non-apple compilers :-(Chris Lattner2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27173 91177308-0d34-0410-b5e6-96231b3b80d8
* Try againEvan Cheng2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27171 91177308-0d34-0410-b5e6-96231b3b80d8
* Incorrect check for FP all one'sEvan Cheng2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27169 91177308-0d34-0410-b5e6-96231b3b80d8
* Change isBuildVectorAllOnesInteger to isBuildVectorAllOnes. Also check forEvan Cheng2006-03-27
| | | | | | | floating point cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27165 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of printing "INTRINSIC" on intrinsic node, print the intrinsic name.Chris Lattner2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27164 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass llvm/test/Regression/CodeGen/Generic/debug-info.ll.Jim Laskey2006-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27158 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAGISel can now natively handle Switch instructions, in the sameNate Begeman2006-03-27
| | | | | | | | | | | | | | | manner that the LowerSwitch LLVM to LLVM pass does: emitting a binary search tree of basic blocks. The new approach has several advantages: it is faster, it generates significantly smaller code in many cases, and it paves the way for implementing dense switch tables as a jump table by handling switches directly in the instruction selector. This functionality is currently only enabled on x86, but should be safe for every target. In anticipation of making it the default, the cfg is now properly updated in the x86, ppc, and sparc select lowering code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27156 91177308-0d34-0410-b5e6-96231b3b80d8
* Bullet proof against undefined args produced by upgrading ols-style debug info.Jim Laskey2006-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27155 91177308-0d34-0410-b5e6-96231b3b80d8
* How to be dumb on $5/day. Need a tri-state to track valid debug descriptors.Jim Laskey2006-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27154 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ISD::isBuildVectorAllZeros predicateEvan Cheng2006-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27147 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to custom lower their own intrinsics if desired.Chris Lattner2006-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27146 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some comments.Chris Lattner2006-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27133 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in ISD::isBuildVectorAllOnesInteger that caused it to always returnChris Lattner2006-03-25
| | | | | | | false git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27131 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the ISD::isBuildVectorAllOnesInteger predicateChris Lattner2006-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27130 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call SimplifyDemandedBits on vectorsChris Lattner2006-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27128 91177308-0d34-0410-b5e6-96231b3b80d8
* fix inverted conditionalChris Lattner2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27089 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack no more.Jim Laskey2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27079 91177308-0d34-0410-b5e6-96231b3b80d8
* Only to vector shuffle for {x,x,y,y} cases when SCALAR_TO_VECTOR is free.Evan Cheng2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27071 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename for truth in advertising.Jim Laskey2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27063 91177308-0d34-0410-b5e6-96231b3b80d8
* prefer to generate constant pool loads over splats. This prevents us fromChris Lattner2006-03-24
| | | | | | | using a splat for {1.0,1.0,1.0,1.0} git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27055 91177308-0d34-0410-b5e6-96231b3b80d8
* fix spelloChris Lattner2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27053 91177308-0d34-0410-b5e6-96231b3b80d8
* legalize vbit_convert nodes whose result is a legal type.Chris Lattner2006-03-24
| | | | | | | Legalize intrinsic nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27036 91177308-0d34-0410-b5e6-96231b3b80d8
* Lower target intrinsics into an INTRINSIC nodeChris Lattner2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27035 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some bogus assertions: noop bitconverts are legalChris Lattner2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27032 91177308-0d34-0410-b5e6-96231b3b80d8
* Lower BUILD_VECTOR to VECTOR_SHUFFLE if there are two distinct nodes (and ifEvan Cheng2006-03-24
| | | | | | | | the target can handle it). Issue two SCALAR_TO_VECTOR ops followed by a VECTOR_SHUFFLE to select from the two vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27023 91177308-0d34-0410-b5e6-96231b3b80d8
* Identify the INTRINSIC nodeChris Lattner2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27020 91177308-0d34-0410-b5e6-96231b3b80d8
* TypoEvan Cheng2006-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27008 91177308-0d34-0410-b5e6-96231b3b80d8
* Unneeded forward.Jim Laskey2006-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27004 91177308-0d34-0410-b5e6-96231b3b80d8