This patch in the strnlen series implements folding of calls with constant string arguments.
Depends on D123816.
Paths
| Differential D123817
[InstCombine] Fold strnlen of constant strings. ClosedPublic Authored by msebor on Apr 14 2022, 1:21 PM.
Details
Summary This patch in the strnlen series implements folding of calls with constant string arguments. Depends on D123816.
Diff Detail
Event Timelinemsebor added a parent revision: D123816: [InstCombine] Fold strnlen with a bound of zero and one..Apr 14 2022, 1:21 PM Comment Actions LG
This revision is now accepted and ready to land.Apr 25 2022, 1:07 PM This revision was landed with ongoing or failed builds.Apr 26 2022, 3:16 PM Closed by commit rG449adafabe46: [InstCombine] Fold strnlen of constant strings. (authored by msebor). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 425318 llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/strnlen-1.ll
llvm/test/Transforms/InstCombine/strnlen-3.ll
|
The Min name doesn't really make sense to me here -- if anything, this is a max. I'd call this LenC or maybe LenWithoutNull to highlight where the -1 comes from.