History log of /external/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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