[all-commits] [llvm/llvm-project] 121ecb: [SCEV] Generalize MatchBinaryAddToConst to support...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jun 24 04:16:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 121ecb05e73427ab3bc6ceeca04fbab161417e6e
      https://github.com/llvm/llvm-project/commit/121ecb05e73427ab3bc6ceeca04fbab161417e6e
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp

  Log Message:
  -----------
  [SCEV] Generalize MatchBinaryAddToConst to support non-add expressions.

This patch generalizes MatchBinaryAddToConst to support matching
(A + C1), (A + C2), instead of just matching (A + C1), A.

The existing cases can be handled by treating non-add expressions A as
A + 0.

Reviewed By: mkazantsev

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




More information about the All-commits mailing list