[PATCH] D71710: [instrinsics] Add @llvm.memcpy.inline instrinsics
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 01:33:00 PST 2020
gchatelet added inline comments.
================
Comment at: llvm/include/llvm/IR/IntrinsicInst.h:659
+ return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
+ }
+ };
----------------
efriedma wrote:
> Maybe hide the base class getLength() with a version that returns a ConstantInt instead? You could use it, for example, in Lint.cpp.
For `Lint.cpp` it has to go through `findValue` which erases the type, not sure what you prefer, make `findValue` a template or `cast` (as it's currently done)
================
Comment at: llvm/test/CodeGen/X86/memcpy-inline.ll:12
+; CHECK-NEXT: retq
+ tail call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* %a, i8* %b, i64 8, i1 0 )
+ ret void
----------------
efriedma wrote:
> It would be a good idea to have a testcase for a larger size that wouldn't normally be inlined. (Also, maybe a test on another target that doesn't have a "memcpy" instruction.)
> Also, maybe a test on another target that doesn't have a "memcpy" instruction.
I'm not sure what you want to test with this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71710/new/
https://reviews.llvm.org/D71710
More information about the llvm-commits
mailing list