Fold strlen(expr ? "str1" : "str2") to x ? len1 : len2. This fires about 330 times...
authorNick Lewycky <nicholas@mxc.ca>
Fri, 2 May 2014 04:11:45 +0000 (04:11 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 2 May 2014 04:11:45 +0000 (04:11 +0000)
commit26ad3eb69d21232c204e76728936f5845ed67474
tree0fa5fe6e091dff47b3377284c75d1c609570283c
parent30e4655a8aa326c9356a6e44c516b3717ddf771b
Fold strlen(expr ? "str1" : "str2") to x ? len1 : len2. This fires about 330 times in a bootstrap of clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207828 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/strlen-1.ll