[all-commits] [llvm/llvm-project] 22a5cd: [SCEV] Separate out constant folding in mul expr c...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Oct 25 10:47:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 22a5cde541c3306e53279fd02c6d60ae6178ef10
      https://github.com/llvm/llvm-project/commit/22a5cde541c3306e53279fd02c6d60ae6178ef10
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-10-25 (Sun, 25 Oct 2020)

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

  Log Message:
  -----------
  [SCEV] Separate out constant folding in mul expr creation

Separate out the code handling constant folding into a separate
block, that is independent of other folds that need a constant
first operand. Also make some minor adjustments to make the
constant folding look nearly identical to the same code in
getAddExpr().

The only reason this change is not strictly NFC is that the
C1*(C2+V) fold is moved below the constant folding, which means
that it now also applies to C1*C2*(C3+V), as it should.




More information about the All-commits mailing list