[PATCH] D117095: [BasicAA] Add support for memmove intrinsic
Evgeniy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 04:01:53 PST 2022
ebrevnov updated this revision to Diff 402468.
ebrevnov added a comment.
Fixed comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117095/new/
https://reviews.llvm.org/D117095
Files:
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/deoptimize.ll
Index: llvm/test/Analysis/BasicAA/deoptimize.ll
===================================================================
--- llvm/test/Analysis/BasicAA/deoptimize.ll
+++ llvm/test/Analysis/BasicAA/deoptimize.ll
@@ -22,7 +22,7 @@
; CHECK-LABEL: Function: test_memcpy_with_deopt:
; CHECK: Just Mod: Ptr: i8* %A <-> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
; CHECK: Just Ref: Ptr: i8* %B <-> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
-; CHECK: NoModRef: Ptr: i32* @G1 <-> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Just Ref: Ptr: i32* @G1 <-> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
%A = alloca i8
%B = alloca i8
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -1020,9 +1020,9 @@
getBestAAResults().alias(MemoryLocation::getForDest(Inst), Loc, AAQI);
// It's also possible for Loc to alias both src and dest, or neither.
ModRefInfo rv = ModRefInfo::NoModRef;
- if (SrcAA != AliasResult::NoAlias)
+ if (SrcAA != AliasResult::NoAlias || Call->hasReadingOperandBundles())
rv = setRef(rv);
- if (DestAA != AliasResult::NoAlias)
+ if (DestAA != AliasResult::NoAlias || Call->hasClobberingOperandBundles())
rv = setMod(rv);
return rv;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117095.402468.patch
Type: text/x-patch
Size: 1540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220124/8ce68c31/attachment.bin>
More information about the llvm-commits
mailing list