[PATCH] D68089: [InstCombine] Optimize some memccpy calls to memcpy

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 09:12:18 PDT 2019


xbolva00 created this revision.
xbolva00 added a reviewer: efriedma.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

return memccpy(d, "helloworld", 'r', 20)

>
=

return memcpy(d, "helloworld", 8 /* pos of 'r' in string */), d + 8


Repository:
  rL LLVM

https://reviews.llvm.org/D68089

Files:
  include/llvm/Transforms/Utils/SimplifyLibCalls.h
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/memccpy-memcpy.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68089.221970.patch
Type: text/x-patch
Size: 5379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190926/71b2841f/attachment.bin>


More information about the llvm-commits mailing list