[all-commits] [llvm/llvm-project] b7aec4: [SCEV] Support rewriting ZExt expressions with loo...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Nov 16 03:16:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7aec4f08e5e231cda3366af961e227e18c5587b
      https://github.com/llvm/llvm-project/commit/b7aec4f08e5e231cda3366af961e227e18c5587b
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll

  Log Message:
  -----------
  [SCEV] Support rewriting ZExt expressions with loop guard info.

So far, applying loop guard information has been restricted to
SCEVUnknown. In a few cases, like PR40961 and PR52464, this leads to
SCEV failing to determine tight upper bounds for the backedge taken
count.

This patch adjusts SCEVLoopGuardRewriter and applyLoopGuards to support
re-writing ZExt expressions.

This is a first step towards fixing  PR40961 and PR52464.

Reviewed By: reames

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




More information about the All-commits mailing list