History log of /external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 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/InstCombineSelect.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/InstCombineSelect.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
5053537a301ee268d3e49f8cf0426f0c536be4e3 27-Sep-2013 Justin Bogner <mail@justinbogner.com> InstCombine: Only foldSelectICmpAndOr for integer types

Currently foldSelectICmpAndOr asserts if the "or" involves a vector
containing several of the same power of two. We can easily avoid this by
only performing the fold on integer types, like foldSelectICmpAnd does.

Fixes <rdar://problem/15012516>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
edac9151fdc24dc2d1eb4692bbfdd71baca12949 29-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Also turn selects fed by an and into arithmetic when the types don't match.

Inserting a zext or trunc is sufficient. This pattern is somewhat common in
LLVM's pointer mangling code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
4ee312bac138a18c39353d4736eb5921532f9624 06-May-2013 Nadav Rotem <nrotem@apple.com> Revert r164763 because it introduces new shuffles.
Thanks Nick Lewycky for pointing this out.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
527db3f26b2b5fc3855ff671344e9691cbd54d37 30-Apr-2013 David Majnemer <david.majnemer@gmail.com> Fix a bug in foldSelectICmpAndOr.

Differences in bitwidth between X and Y could exist even if C1 and C2 have
the same Log2 representation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
defce4cfd607e013169033164def7a3e558bfd54 30-Apr-2013 David Majnemer <david.majnemer@gmail.com> Fix "Combine bit test + conditional or into simple math"

This fixes the optimization introduced in r179748 and reverted in r179750.

While the optimization was sound, it did not properly respect differences in
bit-width.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
9affd163611b90113406b8729cc591eaad4778fa 19-Apr-2013 Jakub Staszak <kubastaszak@gmail.com> Keep coding stanard. Don't use "else if" after "return".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
7754276c4cd257991949231113afa46613c0fdbb 18-Apr-2013 David Majnemer <david.majnemer@gmail.com> Revert "Combine bit test + conditional or into simple math"

It is causing stage2 builds to fail, let's get them running again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
a40a3a59818d1fe394f23cda1df940762e30ea65 18-Apr-2013 David Majnemer <david.majnemer@gmail.com> Combine bit test + conditional or into simple math

Simplify:
(select (icmp eq (and X, C1), 0), Y, (or Y, C2))

Into:
(or (shl (and X, C1), C3), y)

Where:
C3 = Log(C2) - Log(C1)

If:
C1 and C2 are both powers of two


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
03fceff6f69a0261a767aab8e62de8aa9301b86c 05-Apr-2013 Jim Grosbach <grosbach@apple.com> Tidy up a bit. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
d7216a28d6a07a4ea4047a14427c16b96feeb36f 28-Mar-2013 Akira Hatanaka <ahatanaka@mips.com> Check if Type is a vector before calling function Type::getVectorNumElements.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
82a1833865ce34c37a1d0d4b1eb45f730c8b9885 20-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Fix an edge case where constant icmps could sneak into ConstantFoldInstOperands and crash.

Have to refactor the ConstantFolder interface one day to define bugs like this away. Fixes PR14131.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
7e0e166d1783671e555eff26b9932012fadea691 28-Sep-2012 Nick Lewycky <nicholas@mxc.ca> Surprisingly, we missed a trivial case here. Fix that!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
466e0f38d344fd1a64b7be2b3c4e3f7003ef4fef 27-Sep-2012 Nick Lewycky <nicholas@mxc.ca> Prefer shuffles to selects. Backends love shuffles!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
75564e35147dd6e36b864946298b6a35417bb9e6 27-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> fix infinite loop in instcombine in the presence of a (malformed) self-referencing select inst.
This can happen as long as the instruction is not reachable. Instcombine does generate these unreachable malformed selects when doing RAUW

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
7971de4178d3be9b31ac03c20e2b50c3e7f4641c 27-Jul-2012 Pete Cooper <peter_cooper@apple.com> Simplify demanded bits of select sources where the condition is a constant vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
2f6622c7bf10b07ab1370b3696d334bd91d7091d 07-Jun-2012 Nadav Rotem <nadav.rotem@intel.com> Fix a bug in FoldSelectOpOp. Bitcast ops may change the number of vector elements, which may disagree with the select condition type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
37fa1c81ac49dc744899d05a8eb7f038cd1502cd 28-May-2012 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Fix infinite loop when encountering switch on trivial icmp.

The test case feeds the following into InstCombine's visitSelect:
%tobool8 = icmp ne i32 0, 0
%phitmp = select i1 %tobool8, i32 3, i32 0
Then instcombine replaces the right side of the switch with 0, doesn't notice
that nothing changes and tries again indefinitely.

This fixes PR12897.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
4e5a1ab10b62b7ca842afd0e99ac982153f217fb 15-Dec-2011 Pete Cooper <peter_cooper@apple.com> Added InstCombine for "select cond, ~cond, x" type patterns

These can be reduced to "~cond & x" or "~cond | x"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
aab8e28d5e470711d80276bbf717408c3ab966fd 02-Dec-2011 Chad Rosier <mcrosier@apple.com> Fix a few more places where TargetData/TargetLibraryInfo is not being passed.
Add FIXMEs to places that are non-trivial to fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
11357d4f40b2b4101ca39c79574171e058866227 02-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Add a new icmp+select optz'n. Also shows off the load(cst) folding added in
r140966.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
267236ade35200fec4bea0985d7523dacfdb457d 02-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Enhance a couple places where we were doing constant folding of instructions,
but not load instructions. Noticed by inspection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
747032522f9f3b2d9bae71aa303c1a0fd953eee9 20-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
1d2f569c3428d70d0cf690c9adb459ad4a3ecff2 19-Jul-2011 Jay Foad <jay.foad@gmail.com> Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.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/InstCombineSelect.cpp
00805fae5b741a9732579050f60cedc7731f6256 23-Jun-2011 Eli Friedman <eli.friedman@gmail.com> PR10180: Fix a instcombine crash with FP vectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
2c5cc6887412597518ca4a585625b0af1ea71622 28-May-2011 Benjamin Kramer <benny.kra@googlemail.com> ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify instead.

Fixes PR10040.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
17c1bb5d55907cf007d100e4f3c5df4699099b9e 27-May-2011 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Make switch folding with equality compares more aggressive by trying instsimplify on the arm where we know the compared value.

Stuff like "x == y ? y : x&y" now folds into "x&y".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
976e7e1cc8282a965cf20ab54a7dce9165d87ea9 18-May-2011 Eli Friedman <eli.friedman@gmail.com> Switch more inst insertion in instcombine to IRBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
1eca76a611859d17f8be2c37bab78ccfd95e1f46 18-May-2011 Eli Friedman <eli.friedman@gmail.com> Switch more inst insertion in instcombine to IRBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
e87ca454ba39e57a34acab42e4391045d4c8c6cf 18-May-2011 Eli Friedman <eli.friedman@gmail.com> Switch inst insertion in instcombine transform to IRBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
2bf026e3754b167077c62da5698e19b16a3063b1 28-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Remove tabs I accidentally added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
675619ca38adf7d5b019e009add88bcac699bf88 27-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Teach the transformation that moves binary operators around selects to preserve
the subclass optional data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
98cd75027c3db009ffb64aebf613382299858c32 27-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Add a small missed optimization: turn X == C ? X : Y into X == C ? C : Y. This
removes one use of X which helps it pass the many hasOneUse() checks.

In my analysis, this turns up very often where X = A >>exact B and that can't be
simplified unless X has one use (except by increasing the lifetime of A which is
generally a performance loss).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
6b4972518cff5b0f76ec63fc8b93b74ae64c3f3d 11-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: Fix a thinko where transform an icmp under the assumption that it's a zero comparison when it's not.

Fixes PR9454.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
df3bfae1515c826804754616b989b18630fc4d93 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Fold select + select where both selects are on the same condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
aa2be8435693dfe73dac64de3e2b6b3f19df1eac 09-Jan-2011 Tobias Grosser <grosser@fim.uni-passau.de> Instcombine: Fix pattern where the sext did not dominate the icmp using it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
b686eb9186ebefe54b4d33846eb07e1ab0beb234 08-Jan-2011 Frits van Bommel <fvbommel@gmail.com> Fix a bug in r123034 (trying to sext/zext non-integers) and clean up a little.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
46431d7a931ecc54d563a7674977a9a566b1d4fb 07-Jan-2011 Tobias Grosser <grosser@fim.uni-passau.de> InstCombine: Match min/max hidden by sext/zext

X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X
X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X
X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X
X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X
X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X
X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X

Instead of calculating this with mixed types promote all to the
larger type. This enables scalar evolution to analyze this
expression. PR8866

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
8d088bd1e4543e48f6e085885ab3a944fb3f2c93 07-Jan-2011 Tobias Grosser <grosser@fim.uni-passau.de> Some whitespace fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
4ac19470dc26decba85f5bf4dd7e6edb54d77152 23-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> InstCombine: creating selects from -1 and 0 is fine, they combine into a sext from i1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
2f7228b80c6a129fa1d8eef8c3075085003d5b87 11-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Generalize the and-icmp-select instcombine further by allowing selects of the form

(x & 2^n) ? 2^m+C : C

we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the
select to a shift and apply the offset afterwards.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
20e3b4b380e949af32eeb4f184c51bfd62286f1a 11-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Factor the (x & 2^n) ? 2^m : 0 instcombine into its own method and generalize it
to catch cases where n != m with a shift.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
f514f5279043652a8ac915e8e3c176d53980a128 28-Oct-2010 Dale Johannesen <dalej@apple.com> Teach InstCombine not to use Add and Neg on FP. PR 8490.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
835d425a166a7e7e5f0acec9b0323e3735018cba 16-Jul-2010 Owen Anderson <resistor@mac.com> Remove the rest of my instcombine changes. Back to the drawing board on this one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
11acba047007a5bb13eea472e8487bfbbd73ec11 15-Jul-2010 Owen Anderson <resistor@mac.com> Speculatively revert r108429 to fix the clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
40bf5e7a6811bf31b6853d2c71c08feed871419b 15-Jul-2010 Owen Anderson <resistor@mac.com> Per Chris' suggestion, get rid of the select canonicalization and just add
the corresponding or-icmp-and pattern. This has the added benefit of doing
the matching earlier, and thus being less susceptible to being confused by
earlier transforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
96fe621e078837a150b321003f1dd07dd2b830ba 15-Jul-2010 Owen Anderson <resistor@mac.com> Reapply r108378, with bugfixes, testcase, and improved comment formatting.
This now passes LIT, nighty test, and llvm-gcc bootstrap on my machine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
5e84e8e52a9e965b22d21e20ad3ee22b2cf91ce3 15-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Speculatively revert r108378; may be causing bootstrap failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
bd129a746058dc5d8da089f1351ff417de3114e7 15-Jul-2010 Owen Anderson <resistor@mac.com> Add instcombine transforms to optimize tests of multiple bits of the same value into a single larger comparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
1db071f0dae25d0c5a1af61ca71fa20d0a8e9370 08-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Teach instcombine to transform
(X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1
into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional.

This optimization could be extended to take non-const C1 and C2 but we better
stay conservative to avoid code size bloat for now.

for
int sel(int n) {
return n >= 0 ? 60 : 100;
}

we now generate
sarl $31, %edi
andl $40, %edi
leal 60(%rdi), %eax

instead of
testl %edi, %edi
movl $60, %ecx
movl $100, %eax
cmovnsl %ecx, %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
047542669a20505fc7c5f2d93caa5610aa3db2c5 20-Apr-2010 Chris Lattner <sabre@nondot.org> move some select simplifications out out instcombine into
inst simplify. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
21dc20cbd62e0b4617cad7df947318801eec81e6 23-Feb-2010 Dan Gohman <gohman@apple.com> Don't do (X != Y) ? X : Y -> X for floating-point values; it doesn't
handle NaN properly.

Do (X une Y) ? X : Y -> X if one of X and Y is not zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
b0bc6c361da9009e8414efde317d9bbff755f6c0 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
abb992d6a3d2dc05d3f3c62a367ea8977a7dd070 24-Jan-2010 Chris Lattner <sabre@nondot.org> change the canonical form of "cond ? -1 : 0" to be
"sext cond" instead of a select. This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
11acaa374cdcebb161bf0de5f244265d78a749c1 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert a ton of simple integer type equality tests to the new predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
1c22c80d71d7031fa1d4acb4d22dd91beb5487e6 05-Jan-2010 Chris Lattner <sabre@nondot.org> clean up header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
c6334b97e1de7c7c67c7279bdc44eb99ea65c78c 05-Jan-2010 Chris Lattner <sabre@nondot.org> split select out to its own file.


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