From d10d75f73efbe05db5e1264f79b12a368bde83ed Mon Sep 17 00:00:00 2001 From: ruimzhao Date: Thu, 14 Dec 2023 11:48:55 +0800 Subject: [PATCH] Add assertion for load ptr(7),ptr(7) --- lgc/patch/PatchBufferOp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lgc/patch/PatchBufferOp.cpp b/lgc/patch/PatchBufferOp.cpp index 4a9d3bab0a..c728e9a9ad 100644 --- a/lgc/patch/PatchBufferOp.cpp +++ b/lgc/patch/PatchBufferOp.cpp @@ -1503,6 +1503,7 @@ Value *BufferOpLowering::replaceLoadStore(Instruction &inst) { assert(newInst); if (type->isPointerTy()) { + assert(type->getPointerAddressSpace() != ADDR_SPACE_BUFFER_FAT_POINTER); newInst = m_builder.CreateBitCast(newInst, m_builder.getIntNTy(bytesToHandle * 8)); copyMetadata(newInst, &inst); newInst = m_builder.CreateIntToPtr(newInst, type);