[llvm] [ASan][AMDGPU] Fix Assertion Failure. (PR #78710)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 03:36:03 PST 2024


================
@@ -1255,7 +1255,8 @@ void AddressSanitizer::instrumentMemIntrinsic(MemIntrinsic *MI) {
   InstrumentationIRBuilder IRB(MI);
   if (isa<MemTransferInst>(MI)) {
     IRB.CreateCall(isa<MemMoveInst>(MI) ? AsanMemmove : AsanMemcpy,
-                   {MI->getOperand(0), MI->getOperand(1),
+                   {IRB.CreateAddrSpaceCast(MI->getOperand(0), PtrTy),
+                    IRB.CreateAddrSpaceCast(MI->getOperand(1), PtrTy),
----------------
ampandey-1995 wrote:

I don't think we need currently this for memset. 

https://github.com/llvm/llvm-project/pull/78710


More information about the llvm-commits mailing list