[all-commits] [llvm/llvm-project] e38ccb: Recommit "Generalize getInvertibleOperand recurren...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon May 3 16:41:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e38ccb729b205b076356684e055efb7dfc673963
      https://github.com/llvm/llvm-project/commit/e38ccb729b205b076356684e055efb7dfc673963
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-05-03 (Mon, 03 May 2021)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/ValueTracking/known-non-equal.ll

  Log Message:
  -----------
  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




More information about the All-commits mailing list