[PATCH] D136752: Take memset_inline into account in analyzeLoadFromClobberingMemInst
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 02:46:30 PDT 2022
gchatelet updated this revision to Diff 470759.
gchatelet marked an inline comment as done.
gchatelet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136752/new/
https://reviews.llvm.org/D136752
Files:
llvm/lib/Transforms/Utils/VNCoercion.cpp
Index: llvm/lib/Transforms/Utils/VNCoercion.cpp
===================================================================
--- llvm/lib/Transforms/Utils/VNCoercion.cpp
+++ llvm/lib/Transforms/Utils/VNCoercion.cpp
@@ -356,9 +356,9 @@
// If this is memset, we just need to see if the offset is valid in the size
// of the memset..
- if (MI->getIntrinsicID() == Intrinsic::memset) {
+ if (const auto *memset_inst = dyn_cast<MemSetInst>(MI)) {
if (DL.isNonIntegralPointerType(LoadTy->getScalarType())) {
- auto *CI = dyn_cast<ConstantInt>(cast<MemSetInst>(MI)->getValue());
+ auto *CI = dyn_cast<ConstantInt>(memset_inst->getValue());
if (!CI || !CI->isZero())
return -1;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136752.470759.patch
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221026/8cebc776/attachment.bin>
More information about the llvm-commits
mailing list