[PATCH] D108848: [LoopDeletion] Separate logic in breakBackedgeIfNotTaken using symboic max trip count [nfc]

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 09:38:21 PDT 2021


nikic added a comment.

In D108848#2972327 <https://reviews.llvm.org/D108848#2972327>, @reames wrote:

> In D108848#2970549 <https://reviews.llvm.org/D108848#2970549>, @nikic wrote:
>
>> This looks reasonable to me, but doesn't seem to be NFC in practice. Your previous change in D108833 <https://reviews.llvm.org/D108833> resulted in a minor code size decrease in CMakeFiles/7zip-benchmark.dir/CPP/7zip/UI/Common/ArchiveCommandLine.cpp.o and CMakeFiles/7zip-benchmark.dir/CPP/7zip/UI/Console/Main.cpp.o at `O3`, and it looks like this change restores the previous size. I strongly suspect that this is just another SCEV invalidation artifact though.
>
> My best guess here is that we have a case where the trip count logic is able to compute a constant maximum of zero, but for which the exact symbolic trip count is not zero.   I am uncomfortable landing this with the regression noted because I don't know how broadly this triggers.
>
> Any chance you're setup to easily capture the IR (even just the whole module) for one of these?  I'd prefer not to have to get the test-suite setup again, it tends to be pretty time consuming.

Here's the unoptimized IR for both files: https://gist.github.com/nikic/3df8cd975e6a59d287dc00687be1ce27 `opt -O3` reproduces the difference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108848



More information about the llvm-commits mailing list