History log of /llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp (Results 326 – 350 of 463)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0bf0abed 04-Apr-2017 Sanjay Patel <spatel@rotateright.com>

[InstCombine] rename variable for easier reading; NFC

We usually give constants a 'C' somewhere in the name...

llvm-svn: 299474


# c745b6a1 04-Apr-2017 Craig Topper <craig.topper@gmail.com>

[InstCombine] Turn subtract of vectors of i1 into xor like we do for scalar i1. Matches what we already do for add.

llvm-svn: 299472


# 79e5bc52 30-Mar-2017 Craig Topper <craig.topper@gmail.com>

[InstCombine] Fix typo last->least. NFC

llvm-svn: 299123


# 4cc6130f 21-Mar-2017 Artur Pilipenko <apilipenko@azulsystems.com>

NFC. InstCombiner::visitFAdd extract LHSIntVal/RHSIntVal local variables

llvm-svn: 298359


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3
# 4805ce0b 22-Feb-2017 Sanjay Patel <spatel@rotateright.com>

[InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed

Notably, no regression tests change when we remove these calls, and these are expensive

[InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed

Notably, no regression tests change when we remove these calls, and these are expensive calls.

The motivation comes from the general acknowledgement that the compiler is getting slower:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109188.html
http://lists.llvm.org/pipermail/llvm-dev/2016-December/108279.html

And specifically the test case attached to PR32037:
https://bugs.llvm.org//show_bug.cgi?id=32037

Profiling the middle-end (opt) part of the compile:
$ ./opt -O2 row_common.bc -o /dev/null

...visitAdd and visitSub are near the top of the instcombine list, and the calls to SimplifyDemandedInstructionBits()
are high within each of those. Those calls account for 1%+ of the opt time in either debug or release profiles. And
that's the rough win I see from this patch when testing opt built release from r295864 on an iMac with Haswell 4GHz
(model 4790K).

It seems unlikely that we'd be able to eliminate add/sub or change their operands given that add/sub normally affect
all bits, and the PR32037 example shows no IR difference after this change using -O2.

Also worth noting - the code comment in visitAdd:
// This handles stuff like (X & 254)+1 -> (X&254)|1
...isn't true. That transform is handled later with a call to haveNoCommonBitsSet().

Differential Revision: https://reviews.llvm.org/D30270

llvm-svn: 295898

show more ...


# 53c5c3d6 18-Feb-2017 Sanjay Patel <spatel@rotateright.com>

[InstCombine] add nsw/nuw X, signbit --> or X, signbit

Changing to 'or' (rather than 'xor' when no wrapping flags are set)
allows icmp simplifies to happen as expected.

Differential Revision: https

[InstCombine] add nsw/nuw X, signbit --> or X, signbit

Changing to 'or' (rather than 'xor' when no wrapping flags are set)
allows icmp simplifies to happen as expected.

Differential Revision: https://reviews.llvm.org/D29729

llvm-svn: 295574

show more ...


# 845ea963 15-Feb-2017 Sanjay Patel <spatel@rotateright.com>

[InstCombine] improve formatting; NFC

llvm-svn: 295237


Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1
# db0938fd 10-Jan-2017 Sanjay Patel <spatel@rotateright.com>

[InstCombine] add a wrapper for a common pair of transforms; NFCI

Some of the callers are artificially limiting this transform to integer types;
this should make it easier to incrementally remove th

[InstCombine] add a wrapper for a common pair of transforms; NFCI

Some of the callers are artificially limiting this transform to integer types;
this should make it easier to incrementally remove that restriction.

llvm-svn: 291620

show more ...


# 022d2a56 04-Jan-2017 David Majnemer <david.majnemer@gmail.com>

[InstCombine] Combine adds across a zext

We can perform the following:
(add (zext (add nuw X, C1)), C2) -> (zext (add nuw X, C1+C2))

This is only possible if C2 is negative and C2 is greater than o

[InstCombine] Combine adds across a zext

We can perform the following:
(add (zext (add nuw X, C1)), C2) -> (zext (add nuw X, C1+C2))

This is only possible if C2 is negative and C2 is greater than or equal to negative C1.

llvm-svn: 290927

show more ...


# 5ec5f278 30-Dec-2016 David Majnemer <david.majnemer@gmail.com>

[InstCombine] Address post-commit feedback

llvm-svn: 290741


# a1cfd7c5 30-Dec-2016 David Majnemer <david.majnemer@gmail.com>

[InstCombine] More thoroughly canonicalize the position of zexts

We correctly canonicalized (add (sext x), (sext y)) to (sext (add x, y))
where possible. However, we didn't perform the same canonic

[InstCombine] More thoroughly canonicalize the position of zexts

We correctly canonicalized (add (sext x), (sext y)) to (sext (add x, y))
where possible. However, we didn't perform the same canonicalization
for zexts or for muls.

llvm-svn: 290733

show more ...


# aec2fa35 19-Dec-2016 Daniel Jasper <djasper@google.com>

Revert @llvm.assume with operator bundles (r289755-r289757)

This creates non-linear behavior in the inliner (see more details in
r289755's commit thread).

llvm-svn: 290086


# 3ca4a6bc 15-Dec-2016 Hal Finkel <hfinkel@anl.gov>

Remove the AssumptionCache

After r289755, the AssumptionCache is no longer needed. Variables affected by
assumptions are now found by using the new operand-bundle-based scheme. This
new scheme is mo

Remove the AssumptionCache

After r289755, the AssumptionCache is no longer needed. Variables affected by
assumptions are now found by using the new operand-bundle-based scheme. This
new scheme is more computationally efficient, and also we need much less
code...

llvm-svn: 289756

show more ...


Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1
# 6d6eca5c 14-Oct-2016 Sanjay Patel <spatel@rotateright.com>

[InstCombine] use m_APInt to allow sub with constant folds for splat vectors

llvm-svn: 284247


# c6c5965a 14-Oct-2016 Sanjay Patel <spatel@rotateright.com>

[InstCombine] sub X, sext(bool Y) -> add X, zext(bool Y)

Prefer add/zext because they are better supported in terms of value-tracking.

Note that the backend should be prepared for this IR canonical

[InstCombine] sub X, sext(bool Y) -> add X, zext(bool Y)

Prefer add/zext because they are better supported in terms of value-tracking.

Note that the backend should be prepared for this IR canonicalization
(including vector types) after:
https://reviews.llvm.org/rL284015

Differential Revision: https://reviews.llvm.org/D25135

llvm-svn: 284241

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# 9979840f 05-Aug-2016 Justin Bogner <mail@justinbogner.com>

InstCombine: Replace some never-null pointers with references. NFC

llvm-svn: 277792


Revision tags: llvmorg-3.9.0-rc1
# 2d477e59 19-Jul-2016 Sanjay Patel <spatel@rotateright.com>

[InstCombine] fold add(zext(xor X, C), C) --> sext X when C is INT_MIN in the source type

The pattern may look more obviously like a sext if written as:

define i32 @g(i16 %x) {
%zext = zext i

[InstCombine] fold add(zext(xor X, C), C) --> sext X when C is INT_MIN in the source type

The pattern may look more obviously like a sext if written as:

define i32 @g(i16 %x) {
%zext = zext i16 %x to i32
%xor = xor i32 %zext, 32768
%add = add i32 %xor, -32768
ret i32 %add
}

We already have that fold in visitAdd().

Differential Revision: https://reviews.llvm.org/D22477

llvm-svn: 276035

show more ...


# 79acd2a9 16-Jul-2016 Sanjay Patel <spatel@rotateright.com>

[InstCombine] allow X + signbit --> X ^ signbit for vector splats

llvm-svn: 275691


# 135f735a 26-Jun-2016 Benjamin Kramer <benny.kra@googlemail.com>

Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.

Only minor manual fixes. No functionality change intended.

llvm-svn: 273808


# 2b7fef68 22-Jun-2016 Rafael Espindola <rafael.espindola@gmail.com>

Delete more dead code.

Found by gcc 6.

llvm-svn: 273402


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3
# 7a083814 18-Feb-2016 Richard Trieu <rtrieu@google.com>

Remove uses of builtin comma operator.

Cleanup for upcoming Clang warning -Wcomma. No functionality change intended.

llvm-svn: 261270


Revision tags: llvmorg-3.8.0-rc2
# ecefe5a8 02-Feb-2016 Eugene Zelenko <eugene.zelenko@gmail.com>

Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.

Differential revision: http://reviews.llvm.org/D16793

llvm-svn: 259539


# 4b198802 01-Feb-2016 Sanjay Patel <spatel@rotateright.com>

function names start with a lowercase letter; NFC

llvm-svn: 259425


Revision tags: llvmorg-3.8.0-rc1
# eafbd57e 21-Dec-2015 Craig Topper <craig.topper@gmail.com>

[InstCombine] Fix indentation. NFC.

llvm-svn: 256131


Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# ffec81ca 04-Nov-2015 Eugene Zelenko <eugene.zelenko@gmail.com>

Fix some Clang-tidy modernize warnings, other minor fixes.

Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg.

Differential revision: http://reviews.

Fix some Clang-tidy modernize warnings, other minor fixes.

Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg.

Differential revision: http://reviews.llvm.org/D14312

llvm-svn: 252087

show more ...


1...<<111213141516171819