[all-commits] [llvm/llvm-project] 2c1610: [ScalarEvolution] createSCEV(): recognize `udiv`/`...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Thu Jul 2 03:23:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c16100e6f72075564ea1f67fa5a82c269dafcd3
      https://github.com/llvm/llvm-project/commit/2c16100e6f72075564ea1f67fa5a82c269dafcd3
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-07-02 (Thu, 02 Jul 2020)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/sdiv.ll
    M llvm/test/Analysis/ScalarEvolution/srem.ll

  Log Message:
  -----------
  [ScalarEvolution] createSCEV(): recognize `udiv`/`urem` disguised as an `sdiv`/`srem`

Summary:
While InstCombine trivially converts that `srem` into a `urem`,
it might happen later than wanted, in particular i'd like
for that to happen on  https://godbolt.org/z/bwuEmJ test case
early in pipeline, before first instcombine run, just before `-mem2reg`.

SCEV should recognize this case natively.

Reviewers: mkazantsev, efriedma, nikic, reames

Reviewed By: efriedma

Subscribers: clementval, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list