[PATCH] D89724: [Intrinsics] Added writeonly attribute to the first arg of llvm.memmove
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 14:09:54 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd605a119939a: [Intrinsics] Added writeonly attribute to the first arg of llvm.memmove (authored by xbolva00).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89724/new/
https://reviews.llvm.org/D89724
Files:
llvm/include/llvm/IR/Intrinsics.td
llvm/test/Bitcode/upgrade-memory-intrinsics.ll
llvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
Index: llvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
===================================================================
--- llvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
+++ llvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
@@ -18,10 +18,8 @@
ret void
}
-; FIXME: We should eliminate this dead store.
define void @test2(i8* noalias %A, i8* noalias %B) {
; CHECK-LABEL: @test2(
-; CHECK-NEXT: store i8 0, i8* [[A:%.*]], align 1
; CHECK-NEXT: call void @llvm.memmove.p0i8.p0i8.i8(i8* [[A]], i8* [[B:%.*]], i8 12, i1 false)
; CHECK-NEXT: ret void
;
Index: llvm/test/Bitcode/upgrade-memory-intrinsics.ll
===================================================================
--- llvm/test/Bitcode/upgrade-memory-intrinsics.ll
+++ llvm/test/Bitcode/upgrade-memory-intrinsics.ll
@@ -29,8 +29,8 @@
; CHECK: declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg)
; CHECK: declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg)
-; CHECK: declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg)
+; CHECK: declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1 immarg)
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1)
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly , i8* nocapture readonly, i64, i32, i1)
-declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1)
+declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1)
Index: llvm/include/llvm/IR/Intrinsics.td
===================================================================
--- llvm/include/llvm/IR/Intrinsics.td
+++ llvm/include/llvm/IR/Intrinsics.td
@@ -583,7 +583,8 @@
llvm_i1_ty],
[IntrArgMemOnly, IntrWillReturn,
NoCapture<ArgIndex<0>>, NoCapture<ArgIndex<1>>,
- ReadOnly<ArgIndex<1>>, ImmArg<ArgIndex<3>>]>;
+ WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>,
+ ImmArg<ArgIndex<3>>]>;
def int_memset : Intrinsic<[],
[llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty,
llvm_i1_ty],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89724.299164.patch
Type: text/x-patch
Size: 2437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201019/7f387d05/attachment.bin>
More information about the llvm-commits
mailing list