[all-commits] [llvm/llvm-project] be20ea: Look through invertible recurrences in isKnownNonE...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Apr 20 10:52:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be20eae25f50f5ef648aeefa1143e1c31e4410fc
      https://github.com/llvm/llvm-project/commit/be20eae25f50f5ef648aeefa1143e1c31e4410fc
  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:
  -----------
  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




More information about the All-commits mailing list