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

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


xbolva00 marked an inline comment as done.
xbolva00 added a comment.

>> Please add a testcase where the optimization triggers and "c" is 0. (I think getConstantStringInfo trims the null terminator by default?)

Ah, right.



================
Comment at: test/Transforms/InstCombine/memccpy.ll:57
+; CHECK-LABEL: @memccpy_to_null3(
+; CHECK-NEXT:    ret i8* null
+;
----------------
efriedma wrote:
> This is obviously wrong; you've removed the side-effect.
oops


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68089/new/

https://reviews.llvm.org/D68089





More information about the llvm-commits mailing list