[PATCH] D85963: [SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 09:18:32 PDT 2020


xbolva00 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/sprintf-1.ll:169
+define i32 @test_no_simplify3(i8* %dst, i8* %str) minsize {
+; CHECK-IPRINTF-LABEL: @test_no_simplify3(
+; CHECK-IPRINTF-NEXT:    [[STPCPY:%.*]] = call i8* @stpcpy(i8* [[DST:%.*]], i8* [[STR:%.*]])
----------------
Should we do this under minsize or not? 

Extra sub in asm should be ok, but IR has sub and 2x ptrtoints now.



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

https://reviews.llvm.org/D85963



More information about the llvm-commits mailing list