[llvm] [MSan] Update type for MsanMetadataPtrForLoadN and MsanMetadataPtrForStoreN (PR #135040)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 08:32:15 PDT 2025


https://github.com/k-kashapov created https://github.com/llvm/llvm-project/pull/135040

Changed last parameter type for `MsanMetadataPtrForLoadN` and `MsanMetadataPtrForStoreN` from `i64` to `IntptrTy` to keep it consistent with call in `getShadowOriginPtrKernelNoVec`

Ping @vitalybuka 

>From bb31a5540714ee886749a4d9c58cfcf5bc836e2b Mon Sep 17 00:00:00 2001
From: Kamil Kashapov <kashapov at ispras.ru>
Date: Wed, 9 Apr 2025 18:12:26 +0300
Subject: [PATCH] Updated type for MsanMetadataPtrForLoadN and
 MsanMetadataPtrForStoreN

* Changed last parameter type from i64 to IntptrTy to keep it
  consistent with call in getShadowOriginPtrKernelNoVec
---
 llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 0a7a1f2ebbf4c..820ca3eec36cf 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -846,9 +846,9 @@ void MemorySanitizer::createKernelApi(Module &M, const TargetLibraryInfo &TLI) {
   }
 
   MsanMetadataPtrForLoadN = getOrInsertMsanMetadataFunction(
-      M, "__msan_metadata_ptr_for_load_n", PtrTy, IRB.getInt64Ty());
+      M, "__msan_metadata_ptr_for_load_n", PtrTy, IntptrTy);
   MsanMetadataPtrForStoreN = getOrInsertMsanMetadataFunction(
-      M, "__msan_metadata_ptr_for_store_n", PtrTy, IRB.getInt64Ty());
+      M, "__msan_metadata_ptr_for_store_n", PtrTy, IntptrTy);
 
   // Functions for poisoning and unpoisoning memory.
   MsanPoisonAllocaFn = M.getOrInsertFunction(



More information about the llvm-commits mailing list