[llvm] [InstCombine] Fold strlen/wcslen over select/phi of constants (PR #223246)

Haram Jeong via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 00:14:20 PDT 2026


haramj wrote:

@nikic  Ping — when you have a chance, could you take a look at this PR?

I followed the direction you suggested in #217529, moving the constant `strlen`/`wcslen` folding into ConstantFolding and making the select/phi case build on the existing folds.

I'd really appreciate your feedback on whether the current approach is in line with what you had in mind, and on any changes you'd like to see. Thanks!

https://github.com/llvm/llvm-project/pull/223246


More information about the llvm-commits mailing list