[PATCH] D86019: [SLC] Optimize _mempcpy_chk to direct call to mempcpy

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 09:11:55 PDT 2020


xbolva00 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/fortify-folding.ll:36
+; CHECK-LABEL: @test_mempcpy(
+; CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 1 dereferenceable(60) getelementptr inbounds ([60 x i8], [60 x i8]* @a, i64 0, i64 0), i8* nonnull align 1 dereferenceable(60) getelementptr inbounds ([60 x i8], [60 x i8]* @b, i64 0, i64 0), i64 60, i1 false)
+; CHECK-NEXT:    ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @a, i64 0, i64 0)
----------------
Well actually LLVM goes futher and transforms mempcpy to memcpy + dst, since we have more optimizations for memcpy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86019



More information about the llvm-commits mailing list