diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-08 18:29:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-08 18:29:32 -0800 |
| commit | f44da6cc5c0f211c13bd1eb0743d79c7861ea64e (patch) | |
| tree | 3ad4edb5e7806c41003280ebf60fd6419a742105 /source/slang/slang-ir-peephole.cpp | |
| parent | a16f712bb99e426519c9a556b17b54bcc4d1d22d (diff) | |
Support pointers in SPIRV. (#3561)
* Support pointers in SPIRV.
* Fix test.
* Enhance test.
* Fix test.
* Cleanup.
Diffstat (limited to 'source/slang/slang-ir-peephole.cpp')
| -rw-r--r-- | source/slang/slang-ir-peephole.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
