From f44da6cc5c0f211c13bd1eb0743d79c7861ea64e Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 8 Feb 2024 18:29:32 -0800 Subject: Support pointers in SPIRV. (#3561) * Support pointers in SPIRV. * Fix test. * Enhance test. * Fix test. * Cleanup. --- source/slang/slang-ir-peephole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-ir-peephole.cpp') diff --git a/source/slang/slang-ir-peephole.cpp b/source/slang/slang-ir-peephole.cpp index fb67c6842..39a137490 100644 --- a/source/slang/slang-ir-peephole.cpp +++ b/source/slang/slang-ir-peephole.cpp @@ -581,7 +581,7 @@ struct PeepholeContext : InstPassBase auto ptr = inst->getOperand(0); IRBuilder builder(module); builder.setInsertBefore(inst); - auto neq = builder.emitNeq(ptr, builder.getNullVoidPtrValue()); + auto neq = builder.emitNeq(ptr, builder.getNullPtrValue(ptr->getDataType())); inst->replaceUsesWith(neq); maybeRemoveOldInst(inst); changed = true; -- cgit v1.2.3