History log of /llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp (Results 401 – 425 of 463)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 37dc9e19 21-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Rename many DataLayout variables from TD to DL.

I am really sorry for the noise, but the current state where some parts of the
code use TD (from the old name: TargetData) and other parts use DL make

Rename many DataLayout variables from TD to DL.

I am really sorry for the noise, but the current state where some parts of the
code use TD (from the old name: TargetData) and other parts use DL makes it
hard to write a patch that changes where those variables come from and how
they are passed along.

llvm-svn: 201827

show more ...


# 1664dc89 20-Jan-2014 Owen Anderson <resistor@mac.com>

Fix all the remaining lost-fast-math-flags bugs I've been able to find. The most important of these are cases in the generic logic for combining BinaryOperators.
This logic hadn't been updated to ha

Fix all the remaining lost-fast-math-flags bugs I've been able to find. The most important of these are cases in the generic logic for combining BinaryOperators.
This logic hadn't been updated to handle FastMathFlags, and it took me a while to detect it because it doesn't show up in a simple search for CreateFAdd.

llvm-svn: 199629

show more ...


# 970f4959 19-Jan-2014 Benjamin Kramer <benny.kra@googlemail.com>

InstCombine: Hoist 3 copies of AddOne/SubOne into a header.

llvm-svn: 199605


# 72196f3a 19-Jan-2014 Benjamin Kramer <benny.kra@googlemail.com>

InstCombine: Teach most integer add/sub/mul/div combines how to deal with vectors.

llvm-svn: 199602


# e7321660 16-Jan-2014 Owen Anderson <resistor@mac.com>

Fix two cases where we could lose fast math flags when optimizing FADD expressions.

llvm-svn: 199427


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# c7be519d 30-Jul-2013 Owen Anderson <resistor@mac.com>

Preserve fast-math flags when folding (fsub x, (fneg y)) to (fadd x, y).

llvm-svn: 187462


# d6d4da09 26-Jul-2013 Owen Anderson <resistor@mac.com>

Fix variable name.

llvm-svn: 187253


# e37c2e4d 26-Jul-2013 Owen Anderson <resistor@mac.com>

When InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
also worthwhile for it to look through FP extensions and truncations, whose
application commutes with fneg.

llvm-svn: 1

When InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
also worthwhile for it to look through FP extensions and truncations, whose
application commutes with fneg.

llvm-svn: 187249

show more ...


# a9b57f6b 20-Jul-2013 Stephen Lin <stephenwlin@gmail.com>

InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul

llvm-svn: 186759


# 03f9fbbc 17-Jul-2013 Stephen Lin <stephenwlin@gmail.com>

Restore r181216, which was partially reverted in r182499.

llvm-svn: 186533


# 5871321e 15-Jul-2013 Craig Topper <craig.topper@gmail.com>

Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

llvm-svn: 186301


# fc3ea6f4 11-Jul-2013 Benjamin Kramer <benny.kra@googlemail.com>

Don't use a potentially expensive shift if all we want is one set bit.

No functionality change.

llvm-svn: 186095


Revision tags: llvmorg-3.3.1-rc1
# c2af8d62 26-Jun-2013 Michael Gottesman <mgottesman@apple.com>

In InstCombine{AddSub,MulDivRem} convert APFloat.isFiniteNonZero() && !APFloat.isDenormal => APFloat.isNormal.

llvm-svn: 185037


# 3cb77ab9 19-Jun-2013 Michael Gottesman <mgottesman@apple.com>

[APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.

Turns out all the references were in llvm and not in clang.

llvm-svn: 184356


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2
# 0dda6f16 22-May-2013 Jean-Luc Duprat <jduprat@apple.com>

This is an update to a previous commit (r181216).

The earlier change list introduced the following inst combines:
B * (uitofp i1 C) —> select C, B, 0
A * (1 - uitofp i1 C) —> select C, 0, A
select C

This is an update to a previous commit (r181216).

The earlier change list introduced the following inst combines:
B * (uitofp i1 C) —> select C, B, 0
A * (1 - uitofp i1 C) —> select C, 0, A
select C, 0, B + select C, A, 0 —> select C, A, B

Together these 3 changes would simplify :
A * (1 - uitofp i1 C) + B * uitofp i1 C
down to :
select C, B, A

In practice we found that the first two substitutions can have a
negative effect on performance, because they reduce opportunities to
use FMA contractions; between the two options FMAs are often the
better choice. This change list amends the previous one to enable
just these inst combines:

select C, B, 0 + select C, 0, A —> select C, B, A
A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A

llvm-svn: 182499

show more ...


Revision tags: llvmorg-3.3.0-rc1
# 70f286d9 06-May-2013 David Majnemer <david.majnemer@gmail.com>

InstCombine: (X ^ signbit) + C -> X + (signbit ^ C)

llvm-svn: 181249


# 3e4fc3ef 06-May-2013 Jean-Luc Duprat <jduprat@apple.com>

Provide InstCombines for the following 3 cases:
A * (1 - (uitofp i1 C)) -> select C, 0, A
B * (uitofp i1 C) -> select C, B, 0
select C, 0, A + select C, B, 0 -> select C, B, A

These come up in code

Provide InstCombines for the following 3 cases:
A * (1 - (uitofp i1 C)) -> select C, 0, A
B * (uitofp i1 C) -> select C, B, 0
select C, 0, A + select C, B, 0 -> select C, B, A

These come up in code that has been hand-optimized from a select to a linear blend,
on platforms where that may have mattered. We want to undo such changes
with the following transform:
A*(1 - uitofp i1 C) + B*(uitofp i1 C) -> select C, A, B

llvm-svn: 181216

show more ...


# bdbd7346 05-Apr-2013 Jim Grosbach <grosbach@apple.com>

Tidy up a bit. No functional change.

llvm-svn: 178915


# 389ed4b8 25-Mar-2013 Shuxin Yang <shuxin.llvm@gmail.com>

Fix a bug in fast-math fadd/fsub simplification.

The problem is that the code mistakenly took for granted that following constructor
is able to create an APFloat from a *SIGNED* integer:

APF

Fix a bug in fast-math fadd/fsub simplification.

The problem is that the code mistakenly took for granted that following constructor
is able to create an APFloat from a *SIGNED* integer:

APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)

rdar://13486998

llvm-svn: 177906

show more ...


# 2eca602f 14-Mar-2013 Shuxin Yang <shuxin.llvm@gmail.com>

Perform factorization as a last resort of unsafe fadd/fsub simplification.

Rules include:
1)1 x*y +/- x*z => x*(y +/- z)
(the order of operands dosen't matter)

2) y/x +/- z/x => (y +/- z)/

Perform factorization as a last resort of unsafe fadd/fsub simplification.

Rules include:
1)1 x*y +/- x*z => x*(y +/- z)
(the order of operands dosen't matter)

2) y/x +/- z/x => (y +/- z)/x

The transformation is disabled if the new add/sub expr "y +/- z" is a
denormal/naz/inifinity.

rdar://12911472

llvm-svn: 177088

show more ...


# 9d86a4a3 21-Jan-2013 Paul Redmond <paul.redmond@intel.com>

Transform (sub 0, (zext bool to A)) to (sext bool to A) and
(sub 0, (sext bool to A)) to (zext bool to A).

Patch by Muhammad Ahmad
Reviewed by Duncan Sands

llvm-svn: 173093


# 530430be 14-Jan-2013 David Greene <greened@obbligato.org>

Fix Casting Bug

Add a const version of getFpValPtr to avoid a cast-away-const warning.

llvm-svn: 172467


# 9fb823bb 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com>

Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long

Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366

show more ...


Revision tags: llvmorg-3.2.0
# 5b841c4a 19-Dec-2012 Shuxin Yang <shuxin.llvm@gmail.com>

Make sure the buffer, which containas an instance of APFloat, has proper alignment.

llvm-svn: 170486


# 37a1efe1 18-Dec-2012 Shuxin Yang <shuxin.llvm@gmail.com>

rdar://12801297

InstCombine for unsafe floating-point add/sub.

llvm-svn: 170471


1...<<111213141516171819