| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
insert element in instruction combine.
llvm-svn: 198730
|
|
|
|
|
|
|
|
| |
When the elements are extracted from a select on vectors
or a vector select, do the select on the extracted scalars
from the input if there is only one use.
llvm-svn: 194013
|
|
|
|
| |
llvm-svn: 190113
|
|
|
|
| |
llvm-svn: 189524
|
|
|
|
|
|
|
|
| |
undef vector of the wrong type.
LGTM'd by Nick Lewycky on IRC.
llvm-svn: 186224
|
|
|
|
| |
llvm-svn: 183167
|
|
|
|
|
|
|
|
|
|
| |
index greater than the size of the vector is invalid. The shuffle may be
shrinking the size of the vector. Fixes a crash!
Also drop the maximum recursion depth of the safety check for this
optimization to five.
llvm-svn: 183080
|
|
|
|
|
|
| |
insertelement instructions.
llvm-svn: 182976
|
|
|
|
|
|
| |
PR/16177
llvm-svn: 182919
|
|
|
|
| |
llvm-svn: 182909
|
|
|
|
| |
llvm-svn: 182640
|
|
|
|
|
|
|
|
| |
as the BinaryOperator, *not* in the block where the IRBuilder is currently
inserting into. Fixes a bug where scalarizePHI would create instructions
that would not dominate all uses.
llvm-svn: 182639
|
|
|
|
| |
llvm-svn: 181082
|
|
|
|
|
|
|
|
|
| |
This reverts commit r180802
There's ongoing discussion about whether this is the right place to make
this transformation. Reverting for now while we figure it out.
llvm-svn: 180834
|
|
|
|
|
|
|
|
|
|
|
| |
Always fold a shuffle-of-shuffle into a single shuffle when there's only one
input vector in the first place. Continue to be more conservative when there's
multiple inputs.
rdar://13402653
PR15866
llvm-svn: 180802
|
|
|
|
|
|
| |
extract(cast) is transformed to cast(extract). It uses the Builder class as before. In addition the result node is added to the Worklist, so all the previous extract users will become the new scalar cast users.
llvm-svn: 180045
|
|
|
|
|
|
| |
limitation that extract is promoted over a cast only if the cast has only one use.
llvm-svn: 179786
|
|
|
|
|
|
| |
it has only 2 uses: one to promote the vector phi in a loop and the other use is an extract operation of one element at a constant location.
llvm-svn: 179783
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to collapse sequences of insertelement/extractelement
instructions into single shuffle instructions, there is one specific
case where the Instruction Combiner wrongly updates the resulting
Mask of shuffle indexes.
The problem is in function CollectShuffleElments.
If we have a sequence of insert/extract element instructions
like the one below:
%tmp1 = extractelement <4 x float> %LHS, i32 0
%tmp2 = insertelement <4 x float> %RHS, float %tmp1, i32 1
%tmp3 = extractelement <4 x float> %RHS, i32 2
%tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 3
Where:
. %RHS will have a mask of [4,5,6,7]
. %LHS will have a mask of [0,1,2,3]
The Mask of shuffle indexes is wrongly computed to [4,1,6,7]
instead of [4,0,6,7].
When analyzing %tmp2 in order to compute the Mask for the
resulting shuffle instruction, the algorithm forgets to update
the mask index at position 1 with the index associated to the
element extracted from %LHS by instruction %tmp1.
Patch by Andrea DiBiagio!
llvm-svn: 179291
|
|
|
|
|
|
| |
with other code related to shuffles and easier to implement in compiled code.
llvm-svn: 172788
|
|
|
|
| |
llvm-svn: 172784
|
|
|
|
|
|
| |
with a constant zero.
llvm-svn: 172576
|
|
|
|
|
|
|
|
|
|
|
|
| |
An obfuscated splat is where the frontend poorly generates code for a splat
using several different shuffles to create the splat, i.e.,
%A = load <4 x float>* %in_ptr, align 16
%B = shufflevector <4 x float> %A, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
%C = shufflevector <4 x float> %B, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 4, i32 undef>
%D = shufflevector <4 x float> %C, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 2, i32 4>
llvm-svn: 166061
|
|
|
|
|
|
|
| |
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.
llvm-svn: 149116
|
|
|
|
| |
llvm-svn: 149006
|
|
|
|
| |
llvm-svn: 148806
|
|
|
|
|
|
| |
expensive helper.
llvm-svn: 142672
|
|
|
|
|
|
| |
the input and output vectors have different sizes. Patch by Xiaoyi Guo.
llvm-svn: 142671
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
| |
llvm-svn: 128683
|
|
|
|
|
|
|
| |
the instruction passed in. Make sure to account for this correctly, instead
of looping infinitely.
llvm-svn: 126058
|
|
|
|
|
|
| |
setAllBits(), setBit(unsigned), etc.
llvm-svn: 120564
|
|
|
|
| |
llvm-svn: 117728
|
|
|
|
| |
llvm-svn: 117727
|
|
|
|
| |
llvm-svn: 117722
|
|
|
|
|
|
|
|
| |
This code had previously used 2*N, where N is the mask length, to represent
undef. That is not safe because the shufflevector operands may have more
than N elements -- they don't have to match the result type.
llvm-svn: 117721
|
|
|
|
|
|
|
|
| |
Allow splats even if they don't match either of the original shuffles,
possibly due to undef entries in the shuffles masks. Radar 8597790.
Also fix some 80-column violations.
llvm-svn: 117719
|
|
|
|
|
|
| |
vector heavy code. I'll re-enable when we've tracked down the problem.
llvm-svn: 111318
|
|
|
|
|
|
| |
it previously failed.
llvm-svn: 110987
|
|
|
|
|
|
| |
in an external testsuite.
llvm-svn: 110905
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to recognize
patterns generated by clang for transpose of a matrix in generic vectors. This is made
of two parts:
1) Propagating vector extracts of hi/lo half into their users
2) Recognizing an insertion of even elements followed by the odd elements as an unpack.
Testcase to come, but this shrinks the # of shuffle instructions generated on x86 from ~40 to the minimal 8.
llvm-svn: 110734
|
|
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
|
|
|
| |
llvm-svn: 95616
|
|
|
|
| |
llvm-svn: 92684
|
|
llvm-svn: 92683
|