[all-commits] [llvm/llvm-project] e4d20e: [IndVarSimply] Fix assert/release build difference.

Michael Kruse via All-commits all-commits at lists.llvm.org
Wed Feb 19 12:39:15 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e4d20ec8add39209972e55a71c327fa5b4fc4400
      https://github.com/llvm/llvm-project/commit/e4d20ec8add39209972e55a71c327fa5b4fc4400
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-02-19 (Wed, 19 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
    A llvm/test/Transforms/IndVarSimplify/deterministic-scev-verify.ll

  Log Message:
  -----------
  [IndVarSimply] Fix assert/release build difference.

In builds with assertions enabled (!NDEBUG), IndVarSimplify does an
additional query to ScalarEvolution which may change future SCEV queries
since it fills the internal cache differently. The result is actually
only used with the -verify-indvars command line option. We fix the issue
by only calling SE->getBackedgeTakenCount(L) if -verify-indvars is
enabled such that only -verify-indvars shows the behavior, but not debug
builds themselves. Also add a remark to the description of
-verify-indvars about this behavior.

Fixes llvm.org/PR44815

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




More information about the All-commits mailing list