[llvm] 45a5cd4 - [NFC][Alignment] Simplify code in MemorySanitizer

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 06:36:56 PDT 2022


Author: Guillaume Chatelet
Date: 2022-06-13T13:36:36Z
New Revision: 45a5cd41e53c85a80f350eafe5e5390a56632f8a

URL: https://github.com/llvm/llvm-project/commit/45a5cd41e53c85a80f350eafe5e5390a56632f8a
DIFF: https://github.com/llvm/llvm-project/commit/45a5cd41e53c85a80f350eafe5e5390a56632f8a.diff

LOG: [NFC][Alignment] Simplify code in MemorySanitizer

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index b8e080d3ad24..a9cf61e48fa2 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -1881,7 +1881,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
     Type *ShadowTy = getShadowTy(&I);
     Value *Addr = I.getPointerOperand();
     Value *ShadowPtr = nullptr, *OriginPtr = nullptr;
-    const Align Alignment = assumeAligned(I.getAlignment());
+    const Align Alignment = I.getAlign();
     if (PropagateShadow) {
       std::tie(ShadowPtr, OriginPtr) =
           getShadowOriginPtr(Addr, IRB, ShadowTy, Alignment, /*isStore*/ false);


        


More information about the llvm-commits mailing list