[all-commits] [llvm/llvm-project] ad1b87: [SCEVExpander] Only create multiplication if needed.

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Jan 10 00:52:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad1b8772cf6b16c1162bb8ff425679f5ff046ae9
      https://github.com/llvm/llvm-project/commit/ad1b8772cf6b16c1162bb8ff425679f5ff046ae9
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-01-10 (Mon, 10 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/LoopVersioning/wrapping-pointer-versioning.ll

  Log Message:
  -----------
  [SCEVExpander] Only create multiplication if needed.

9345ab3a4550 updated generateOverflowCheck to skip creating checks that
always evaluate to false. This in turn means that we only need to
compute |Step| * Trip count  if the result of the multiplication is
actually used.

Sink the multiplication into ComputeEndCheck, so it is only created
when there's an actual check.




More information about the All-commits mailing list