Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
cfa5ecde |
| 05-Nov-2024 |
Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> |
ValueTracking/test: cover recur limit in non-equal PHIs (#113205)
Add a test covering the recursion limit of isNonEqualPHIs.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
6df63203 |
| 15-Dec-2023 |
bipmis <102525366+bipmis@users.noreply.github.com> |
[ValueTracking] isNonEqual Pointers with with a recursive GEP (#70459)
Handles canonical icmp eq(ptr1, ptr2) -> where ptr1/ptr2 is a recursive
GEP.
Can helps scenarios where InstCombineCompares fo
[ValueTracking] isNonEqual Pointers with with a recursive GEP (#70459)
Handles canonical icmp eq(ptr1, ptr2) -> where ptr1/ptr2 is a recursive
GEP.
Can helps scenarios where InstCombineCompares folds icmp eq(sub(ptr2int,
ptr2int), 0) -> icmp eq(ptr1, ptr2)
and
icmp eq(phi(sub(ptr2int, ptr2int), ...)) -> phi i1 (icmp eq(sub(ptr2int,
ptr2int), 0), ....)
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
7fbbbfd6 |
| 16-Dec-2022 |
Nikita Popov <npopov@redhat.com> |
[ValueTracking] Convert tests to opaque pointers (NFC)
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
ec9ccb16 |
| 21-Oct-2022 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
[test] Use -passes syntax in Analysis tests
Another step towards getting rid of dependencies to the legacy pass manager.
Primary change here is to just do -passes=foo instead of -foo in simple situ
[test] Use -passes syntax in Analysis tests
Another step towards getting rid of dependencies to the legacy pass manager.
Primary change here is to just do -passes=foo instead of -foo in simple situations (when running a single pass). But also updated a few test running multiple passes.
show more ...
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
e38ccb72 |
| 03-May-2021 |
Philip Reames <listmail@philipreames.com> |
Recommit "Generalize getInvertibleOperand recurrence handling slightly"
This was reverted because of a reported problem. It turned out this patch didn't introduce said problem, it just exposed it m
Recommit "Generalize getInvertibleOperand recurrence handling slightly"
This was reverted because of a reported problem. It turned out this patch didn't introduce said problem, it just exposed it more widely. 15a4233 fixes the root issue, so this simple a) rebases over that, and b) adds a much more extensive comment explaining why that weakened assert is correct.
Original commit message follows:
Follow up to D99912, specifically the revert, fix, and reapply thereof.
This generalizes the invertible recurrence logic in two ways: * By allowing mismatching operand numbers of the phi, we can recurse through a pair of phi recurrences whose operand orders have not been canonicalized. * By allowing recurrences through operand 1, we can invert these odd (but legal) recurrence.
Differential Revision: https://reviews.llvm.org/D100884
show more ...
|
#
2d6aff84 |
| 03-May-2021 |
Philip Reames <listmail@philipreames.com> |
One more test case inspired by PR50191
|
#
32b50043 |
| 03-May-2021 |
Philip Reames <listmail@philipreames.com> |
Add some additional test cases inspired by PR50191
|
#
a047837b |
| 29-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Revert "Generalize getInvertibleOperand recurrence handling slightly"
This reverts commit 0c01b37eeb18a51a7e9c9153330d8009de0f600e while a problem reported is investigated.
|
#
0c01b37e |
| 28-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Generalize getInvertibleOperand recurrence handling slightly
Follow up to D99912, specifically the revert, fix, and reapply thereof.
This generalizes the invertible recurrence logic in two ways: *
Generalize getInvertibleOperand recurrence handling slightly
Follow up to D99912, specifically the revert, fix, and reapply thereof.
This generalizes the invertible recurrence logic in two ways: * By allowing mismatching operand numbers of the phi, we can recurse through a pair of phi recurrences whose operand orders have not been canonicalized. * By allowing recurrences through operand 1, we can invert these odd (but legal) recurrence.
Differential Revision: https://reviews.llvm.org/D100884
show more ...
|
#
4623d4ff |
| 28-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
[tests] Precommit some extra tests for D100884
|
#
6792e26c |
| 20-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Reapply "Look through invertible recurrences in isKnownNonEqual"
I'd reverted this in commit 3b6acb179708ea2f3caf95ace0f134fcbc460333 due to buildbot failures. This patch contains the fix for said
Reapply "Look through invertible recurrences in isKnownNonEqual"
I'd reverted this in commit 3b6acb179708ea2f3caf95ace0f134fcbc460333 due to buildbot failures. This patch contains the fix for said issue. I'd forgotten to handle the case where two phis in the same block have different operand order. We canonicalize away from this, but it's still valid IR. The tests included in this change (as opposed to simply having test output changed), crashed without the fix.
Original commit message follows...
This extends the phi handling in isKnownNonEqual with a special case based on invertible recurrences. If we can prove the recurrence is invertible (which many common ones are), we can recurse through the start operands of the recurrence skipping the phi cycle.
(Side note: Instcombine currently does not push back through these cases. I will implement that in a follow up change w/separate review.)
Differential Revision: https://reviews.llvm.org/D99912
show more ...
|
#
3b6acb17 |
| 20-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Revert "Look through invertible recurrences in isKnownNonEqual"
This reverts commit be20eae25f50f5ef648aeefa1143e1c31e4410fc. It appears to have caused a crash on a buildbot (https://lab.llvm.org/b
Revert "Look through invertible recurrences in isKnownNonEqual"
This reverts commit be20eae25f50f5ef648aeefa1143e1c31e4410fc. It appears to have caused a crash on a buildbot (https://lab.llvm.org/buildbot#builders/77/builds/5653). Reverting while investigating.
show more ...
|
#
be20eae2 |
| 20-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Look through invertible recurrences in isKnownNonEqual
This extends the phi handling in isKnownNonEqual with a special case based on invertible recurrences. If we can prove the recurrence is inverti
Look through invertible recurrences in isKnownNonEqual
This extends the phi handling in isKnownNonEqual with a special case based on invertible recurrences. If we can prove the recurrence is invertible (which many common ones are), we can recurse through the start operands of the recurrence skipping the phi cycle.
(Side note: Instcombine currently does not push back through these cases. I will implement that in a follow up change w/separate review.)
Differential Revision: https://reviews.llvm.org/D99912
show more ...
|
#
07b00499 |
| 20-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
[test] Add a couple more tests for D99912
|
#
3b7f6fd2 |
| 20-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
[tests] Update per review comment on D99912
(I'd copy and pasted the wrong test before tweaking, as a result, it wasn't a very good negative test.)
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5 |
|
#
13deb6aa |
| 06-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Exact ashr/lshr don't loose any set bits and are thus trivially invertible
Use that fact to improve isKnownNonEqual.
|
#
1d4c7429 |
| 05-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Fix copy paste errors in tests from be11bd1e
Several of these weren't testing what was intented.
|
#
be11bd1e |
| 05-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
[tests] Precommmit tests for reasoning about equality of recurrences
|
Revision tags: llvmorg-12.0.0-rc4 |
|
#
fd7df0cf |
| 26-Mar-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Handle shl pair in isKnownNonEqual()
Handle (x << s) != (y << s) where x != y and the shifts are non-wrapping. Once again, this establishes parity with the corresponing mul fold that
[ValueTracking] Handle shl pair in isKnownNonEqual()
Handle (x << s) != (y << s) where x != y and the shifts are non-wrapping. Once again, this establishes parity with the corresponing mul fold that already exists. The shift case is more powerful because we don't need to guard against multiplies by zero.
show more ...
|
#
9666e89d |
| 26-Mar-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Handle shl in isKnownNonEqual()
This handles the pattern X != X << C for non-zero X and C and a non-overflowing shift. This establishes parity with the corresponing fold for multipli
[ValueTracking] Handle shl in isKnownNonEqual()
This handles the pattern X != X << C for non-zero X and C and a non-overflowing shift. This establishes parity with the corresponing fold for multiplies.
show more ...
|
#
5c85c37c |
| 26-Mar-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Add tests for non equal shifts (NFC)
|
#
3fd64cc7 |
| 11-Mar-2021 |
Jingu Kang <jingu.kang@arm.com> |
[ValueTracking] Handle two PHIs in isKnownNonEqual()
loop: %cmp.0 = phi i32 [ 3, %entry ], [ %inc, %loop ] %pos.0 = phi i32 [ 1, %entry ], [ %cmp.0, %loop ] ... %inc = add i32 %cmp.0, 1 br
[ValueTracking] Handle two PHIs in isKnownNonEqual()
loop: %cmp.0 = phi i32 [ 3, %entry ], [ %inc, %loop ] %pos.0 = phi i32 [ 1, %entry ], [ %cmp.0, %loop ] ... %inc = add i32 %cmp.0, 1 br label %loop
On above example, %pos.0 uses previous iteration's %cmp.0 with backedge according to PHI's instruction's defintion. If the %inc is not same among iterations, we can say the two PHIs are not same.
Differential Revision: https://reviews.llvm.org/D98422
show more ...
|
#
d11d5d1c |
| 21-Mar-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Improve mul handling in isKnownNonEqual()
X != X * C is true if: * C is not 0 or 1 * X is not 0 * mul is nsw or nuw
Proof: https://alive2.llvm.org/ce/z/uwF29z
This is motivated
[ValueTracking] Improve mul handling in isKnownNonEqual()
X != X * C is true if: * C is not 0 or 1 * X is not 0 * mul is nsw or nuw
Proof: https://alive2.llvm.org/ce/z/uwF29z
This is motivated by one of the cases in D98422.
show more ...
|
#
f5bbdf2a |
| 21-Mar-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Add more tests for isKnownNonEqual() of mul (NFC)
This is for the case of (x * C) == x, rather than the (x * C1) == (x * C2) variant that we already cover.
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
dcd21572 |
| 28-Dec-2020 |
Nikita Popov <nikita.ppv@gmail.com> |
[ValueTracking] Fix isKnownNonEqual() with constexpr mul
Confusingly, BinaryOperator is not an Operator, OverflowingBinaryOperator is... We were implicitly assuming that the multiply is an Instructi
[ValueTracking] Fix isKnownNonEqual() with constexpr mul
Confusingly, BinaryOperator is not an Operator, OverflowingBinaryOperator is... We were implicitly assuming that the multiply is an Instruction here.
This fixes the assertion failure reported in https://reviews.llvm.org/D92726#2472827.
show more ...
|