[all-commits] [llvm/llvm-project] 0dda63: [SCEV] Strength nowrap flags after constant folding

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


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

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
    M llvm/test/Analysis/ScalarEvolution/trip-count15.ll
    M llvm/test/Analysis/ScalarEvolution/trip-count9.ll
    M llvm/test/Transforms/IndVarSimplify/X86/eliminate-trunc.ll
    M llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
    M llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
    M llvm/test/Transforms/LoopReroll/nonconst_lb.ll
    M llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll

  Log Message:
  -----------
  [SCEV] Strength nowrap flags after constant folding

We should first try to constant fold the add expression and only
strengthen nowrap flags afterwards. This allows us to determine
stronger flags if e.g. only two operands are left after constant
folding (and thus "guaranteed no wrap region" code applies) or the
resulting operands are non-negative and thus nsw->nuw strengthening
applies.




More information about the All-commits mailing list