[all-commits] [llvm/llvm-project] bb7b85: [InstCombine] Optimize some memccpy calls to memcp...

Dávid Bolvanský via All-commits all-commits at lists.llvm.org
Tue Nov 26 01:54:57 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bb7b8540f09a300350208ce38335a9b6280d5042
      https://github.com/llvm/llvm-project/commit/bb7b8540f09a300350208ce38335a9b6280d5042
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/memccpy.ll

  Log Message:
  -----------
  [InstCombine] Optimize some memccpy calls to memcpy/null

Summary:
return memccpy(d, "helloworld", 'r', 20)
=>
return memcpy(d, "helloworld", 8 /* pos of 'r' in string */), d + 8

Reviewers: efriedma, jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68089




More information about the All-commits mailing list