[PATCH] D32839: SimplifyLibCalls: Optimize wcslen

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 11:40:38 PDT 2017


MatzeB updated this revision to Diff 99608.
MatzeB added a comment.

- Add a test passing a pointer to an array with the wrong size to wcslen.
- Add variants of tests in wcslen-1.ll in wcslen-3.ll that test with `sizeof(wchar_t)==2`.
- (The clang patch to always emit wchar_size is approved.)


Repository:
  rL LLVM

https://reviews.llvm.org/D32839

Files:
  include/llvm/Analysis/TargetLibraryInfo.h
  include/llvm/Analysis/ValueTracking.h
  include/llvm/IR/Constants.h
  include/llvm/Transforms/Utils/SimplifyLibCalls.h
  lib/Analysis/TargetLibraryInfo.cpp
  lib/Analysis/ValueTracking.cpp
  lib/IR/Constants.cpp
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/wcslen-1.ll
  test/Transforms/InstCombine/wcslen-2.ll
  test/Transforms/InstCombine/wcslen-3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32839.99608.patch
Type: text/x-patch
Size: 35021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/b343ef87/attachment.bin>


More information about the llvm-commits mailing list