[PATCH] D147910: [IRCE] Relax restrictions on IRCE's latch exit count

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 22:53:59 PDT 2023


mkazantsev requested review of this revision.
mkazantsev added a comment.

Actually it's not a problem. Yes, type of loop's exit count may become wider, but its only usage is:

  const IntegerType *Ty = ExitCountTy;
  
  auto *RTy = cast<IntegerType>(Range.getType());
  
  // We only support wide range checks and narrow latches.
  if (!AllowNarrowLatchCondition && RTy != Ty)
    return std::nullopt;
  if (RTy->getBitWidth() < Ty->getBitWidth())
    return std::nullopt;

So wider type is actually more permissive, so there is no point in trying to preserve old behavior because new is same or better.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147910/new/

https://reviews.llvm.org/D147910



More information about the llvm-commits mailing list