[all-commits] [llvm/llvm-project] 6792e2: Reapply "Look through invertible recurrences in is...
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Apr 20 12:48:23 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6792e26c0d0f2260f1e12693382e184f5ea1966f
https://github.com/llvm/llvm-project/commit/6792e26c0d0f2260f1e12693382e184f5ea1966f
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-04-20 (Tue, 20 Apr 2021)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Analysis/ValueTracking/known-non-equal.ll
Log Message:
-----------
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
More information about the All-commits
mailing list