@@ -4873,7 +4873,7 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II,
48734873 unsigned PtrAS = cast<PointerType>(LLVMPtrOp->getType ())->getAddressSpace ();
48744874 auto *PtrOp = transValue (LLVMPtrOp, BB);
48754875 if (PtrAS == SPIRAS_Private)
4876- return BM->addLifetimeInst (OC, PtrOp, 0 , BB);
4876+ return BM->addLifetimeInst (OC, PtrOp, Size , BB);
48774877 // If pointer address space is Generic - use original allocation.
48784878 BM->getErrorLog ().checkError (
48794879 PtrAS == SPIRAS_Generic, SPIRVEC_InvalidInstruction, II,
@@ -4882,7 +4882,7 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II,
48824882 auto *UI = static_cast <SPIRVUnary *>(PtrOp);
48834883 PtrOp = UI->getOperand (0 );
48844884 }
4885- return BM->addLifetimeInst (OC, PtrOp, 0 , BB);
4885+ return BM->addLifetimeInst (OC, PtrOp, Size , BB);
48864886 }
48874887 // We don't want to mix translation of regular code and debug info, because
48884888 // it creates a mess, therefore translation of debug intrinsics is
0 commit comments