[all-commits] [llvm/llvm-project] 9345ab: [SCEVExpander] Skip creating <u 0 check, which is ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Jan 8 02:42:00 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9345ab3a45509f61175e73084c03fbb523fb05cb
      https://github.com/llvm/llvm-project/commit/9345ab3a45509f61175e73084c03fbb523fb05cb
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-01-08 (Sat, 08 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
    M llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
    M llvm/test/Transforms/LoopVersioning/wrapping-pointer-versioning.ll

  Log Message:
  -----------
  [SCEVExpander] Skip creating <u 0 check, which is always false.

Unsigned compares of the form <u 0 are always false. Do not create such
a redundant check in generateOverflowCheck.

The patch introduces a new lambda to create the check, so we can
exit early conveniently and skip creating some instructions feeding the
check.

I am planning to sink a few additional instructions as follow-ups, but I
would prefer to do this separately, to keep the changes and diff
smaller.

Reviewed By: reames

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




More information about the All-commits mailing list