[PATCH] D154725: [AggressiveInstCombine] Fold strcmp for short string literals

Maksim Kita via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 11:52:19 PDT 2023


kitaisreal added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:269
+  });
+}
+
----------------
goldstein.w.n wrote:
> This should probably have a max iteration cnt?
I am not sure about the requested change. You suggest to add `max_iteration_count` argument to `isOnlyUsedInZeroComparison` function, and relace `all_of` `I->users()` iteration with loop, so we can limit iteration count ? Can you please provide more information about the requested change.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:907
+  return false;
+}
+
----------------
goldstein.w.n wrote:
> should the sqrt patch be split into a preliminary NFC?
Do you propose to extract most of the changes from `AggressiveInstCombine`, that are not related to `expandStrcmp` in separate patch ?


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

https://reviews.llvm.org/D154725



More information about the llvm-commits mailing list