[PATCH] D146457: [LSR] Use evaluateAtIteration in lsr-term-fold

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 03:53:38 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM

> All of the test changes are, to my eye, semantically the same.

I don't think they are: Let's say that `%length == 0`, which means that the BECount is -1. Previously, this just extended `%length` to `i64`, so that the effective trip count was zero. Now we instead extend `-1` and then add the stride, making the trip count correct. The previous code was using an incorrect order of extensions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146457



More information about the llvm-commits mailing list