[PATCH] D123819: [InstCombine] Fold strlen and strnlen recursively.
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 09:01:00 PDT 2022
xbolva00 added a comment.
Cases like strlen (x ? s1 : s2) should be handled in more general fashion and rewrite fn (x ? s1 : s2) as x ? fn(s1) : fn(s2) if fn(s1) and (or?) fn(s2) can be optimized to just some (constant) value.
Same for more chains like fn (x == 3 ? s3 : x == 5 ? s5 : s7) to x == 3 ? fn(s3) : x == 5 ? fn(s2) : fn(s5).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123819/new/
https://reviews.llvm.org/D123819
More information about the llvm-commits
mailing list