History log of /external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
eba6d384489be4e56718186aa7ed7e484df24613 04-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Scalarize select vector arguments when extracted.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
4598bd53ab89c3d120ad8249abbfdc7e2d64d291 06-Sep-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Use type helper functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
b70d79e7e93cbca738130a71c9431e104acd317b 29-Aug-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
ebe11477225cc2793b43073bddc17f484839e006 13-Jul-2013 Joey Gouly <joey.gouly@arm.com> Fix a crash in EvaluateInDifferentElementOrder where it would generate an
undef vector of the wrong type.

LGTM'd by Nick Lewycky on IRC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
4526d1cd4a4238f67710f98a1e44688b99fc3ba7 04-Jun-2013 Nick Lewycky <nicholas@mxc.ca> Delete dead safety check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
e4546cb71e14baa0cde8f85a12cfa8b2d44fe708 01-Jun-2013 Nick Lewycky <nicholas@mxc.ca> When determining the new index for an insertelement, we may not assume that an
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
903f26d904cb7eba9b57ed85b2dc6147a8811bd7 31-May-2013 Nick Lewycky <nicholas@mxc.ca> Reapply with r182909 with a fix to the calculation of the new indices for
insertelement instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
ccb7bd9d84602c1fb5514dcee6de3420f175176a 30-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Revert r182909.

PR/16177


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
e97b102e2b597751c9e9edce74d3d69bba317dcd 30-May-2013 Nick Lewycky <nicholas@mxc.ca> Swizzle vector inputs if it helps us eliminate shuffles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
7ab9fb02f821806de5e27d01a123260dca799575 24-May-2013 Joey Gouly <joey.gouly@arm.com> Run clang-format over the scalarizePHI function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
4a941316cdcfbc3671c806c9c40df1bad09ba6ad 24-May-2013 Joey Gouly <joey.gouly@arm.com> scalarizePHI needs to insert the next ExtractElement in the same block
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
cd4e5e9b34c1f155cf4495431f7cc6e10e2d390b 04-May-2013 Nick Lewycky <nicholas@mxc.ca> Tabs to spaces. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
10cc563bfe330cf4118b2f0db6706c244e77ebb3 01-May-2013 Jim Grosbach <grosbach@apple.com> Revert "InstCombine: Fold more shuffles of shuffles."

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
6548096a2e2b34e685680e6e1055b8e407c2c243 30-Apr-2013 Jim Grosbach <grosbach@apple.com> InstCombine: Fold more shuffles of shuffles.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
c9090b0723bdbeba65dc6b4771ca166e4a99a9cc 22-Apr-2013 Anat Shemer <anat.shemer@intel.com> Changed back (relative to commit 179786) the operations executed when 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
86dc3f3739eedc26f2fd1f6ade1633c1fa84bd7d 18-Apr-2013 Anat Shemer <anat.shemer@intel.com> In the function InstCombiner::visitExtractElementInst() removed the limitation that extract is promoted over a cast only if the cast has only one use.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
77e95d04c430bc849aa1898cbd820517ec0f7465 18-Apr-2013 Anat Shemer <anat.shemer@intel.com> Added a function scalarizePHI() that sclarizes a vector phi instruction if 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
c37cb66e6ee256bcb3ba138383e4cb9aab55ddb9 11-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix for wrong instcombine on vector insert/extract

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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
081c29b25696006bb72a7ac1035e05f8f935513f 18-Jan-2013 Craig Topper <craig.topper@gmail.com> Check for less than 0 in shuffle mask instead of -1. It's more consistent with other code related to shuffles and easier to implement in compiled code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
37d093f0b0e4b4d1c49efbf2bdcc9827527e3b9f 18-Jan-2013 Craig Topper <craig.topper@gmail.com> Remove trailing whitespace. Remove new lines between closing brace and 'else'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
83d585383345b84ae4a9590e97135f95ae39406b 16-Jan-2013 Nadav Rotem <nrotem@apple.com> Teach InstCombine to optimize extract of a value from a vector add operation with a constant zero.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
4932bbe20c4b96552dcab332503b80ff3b56ad93 16-Oct-2012 Michael Gottesman <mgottesman@apple.com> [InstCombine] Teach InstCombine how to handle an obfuscated splat.

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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
a78fa8cc2dd6d2ffe5e4fe605f38aae7b3d2fb7a 27-Jan-2012 Chris Lattner <sabre@nondot.org> continue making the world safe for ConstantDataVector. At this point,
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
230cdab2205d051cc11c565b69ca8c2106904a76 26-Jan-2012 Chris Lattner <sabre@nondot.org> some general cleanup, using new methods and tidying up old code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
bec2d03c4d774e67ebc586b3a00792d996f26140 24-Jan-2012 Chris Lattner <sabre@nondot.org> basic instcombine support for CDS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
8d992f5c2c90ebc8963679de51f461dc5d54fae1 21-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Minor simplification: use ShuffleVectorInst::getMaskValue instead of a more expensive helper.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
d2822e7572e75287db66acb14b2d988a80faebdd 21-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Extend instcombine's shufflevector simplification to handle more cases where the input and output vectors have different sizes. Patch by Xiaoyi Guo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
0ff8a4fa35db853dfc3dbe54535aa326d8e742a2 01-Apr-2011 Nadav Rotem <nadav.rotem@intel.com> Instcombile optimization: extractelement(cast) -> cast(extractelement)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
1347623aaf25b7fe6486479353fc87bd7541a5f7 19-Feb-2011 Eli Friedman <eli.friedman@gmail.com> PR9218: SimplifyDemandedVectorElts can return a non-null value that is not
the instruction passed in. Make sure to account for this correctly, instead
of looping infinitely.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
7a874ddda037349184fbeb22838cc11a1a9bb78f 01-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Rename overloaded APInt methods set(), clear(), flip() to
setAllBits(), setBit(unsigned), etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
db1da8ed42cbe50945acfaca514864723999150a 30-Oct-2010 Bob Wilson <bob.wilson@apple.com> Clean up indentation and other whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
09fd64644d5da2dacc0916790082ac0dd5d9696d 30-Oct-2010 Bob Wilson <bob.wilson@apple.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
f0b48f836e85e4e9ae3b5f94c47500d40e3dc16e 30-Oct-2010 Bob Wilson <bob.wilson@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
822cb58d087ab67804037807e130273481b86137 30-Oct-2010 Bob Wilson <bob.wilson@apple.com> Change instcombine's getShuffleMask to represent undef with negative values.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
4cac5facc3a95a81ffa2c85baae001a7c509146c 30-Oct-2010 Bob Wilson <bob.wilson@apple.com> Make instcombine a little more aggressive in combining vector shuffles.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
68c23f861694f7b06df2ce39ced01d1d39fc5809 18-Aug-2010 Eric Christopher <echristo@apple.com> Temporarily revert r110987 as it's causing some miscompares in
vector heavy code. I'll re-enable when we've tracked down the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
7f1f4089a142e4f0081ac25699bf682a68247a35 13-Aug-2010 Nate Begeman <natebegeman@mac.com> Reapply this transformation now that it is passing the external test which it previously failed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
74862789001b62350fa1a316150fdab04689a0bc 12-Aug-2010 Eric Christopher <echristo@apple.com> Temporarily revert 110737 and 110734, they were causing failures
in an external testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
95743d8748a85bbb03aff3b3baae728c138acbab 10-Aug-2010 Nate Begeman <natebegeman@mac.com> Add the minimal amount of smarts necessary to instcombine of shufflevectors 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
1df9859c40492511b8aa4321eb76496005d3b75b 16-Feb-2010 Duncan Sands <baldrick@free.fr> There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
8609fda0f7e4446de85f882755601ffcbd540324 09-Feb-2010 Chris Lattner <sabre@nondot.org> fix some problems handling large vectors reported in PR6230


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
d5da27186350345794b82f036d75f6d1e9bfbbbd 05-Jan-2010 Chris Lattner <sabre@nondot.org> reduce indentation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
b8a5cecd6bc74d6c1c256263f857f79f383e53bd 05-Jan-2010 Chris Lattner <sabre@nondot.org> split vector stuff out to InstCombineVectorOps.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp