[PATCH] D154725: [AggressiveInstCombine] Fold strcmp for short string literals
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 02:38:56 PDT 2023
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:920
+
+ bool Match = !HasStr1 && HasStr2 && Str2.size() == 1;
+ if (!Match)
----------------
GCC I think “inlines “ strcmp up to some length, but not strictly 1, no?
Also it can inline (expand) strcmp calls if we know that src/dst are dereferenceable with known size.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154725/new/
https://reviews.llvm.org/D154725
More information about the llvm-commits
mailing list