[all-commits] [llvm/llvm-project] b76f1f: [SCEV] Keep common NUW flags when inlining Add ope...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jun 9 09:21:58 PDT 2021


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

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
    M llvm/test/Analysis/ScalarEvolution/no-wrap-symbolic-becount.ll
    M llvm/unittests/Analysis/ScalarEvolutionTest.cpp

  Log Message:
  -----------
  [SCEV] Keep common NUW flags when inlining Add operands.

Currently, NoWrapFlags are dropped if we inline operands of SCEVAddExpr
operands. As a consequence, we always drop flags when building
expressions like `getAddExpr(A, getAddExpr(B, C, NUW), NUW)`.

We should be able to retain NUW flags common among all inlined
SCEVAddExpr and the original flags.

Reviewed By: nikic, mkazantsev

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




More information about the All-commits mailing list