summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-peephole.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-ir-peephole.cpp b/source/slang/slang-ir-peephole.cpp
index d4369da7a..88b26fbd3 100644
--- a/source/slang/slang-ir-peephole.cpp
+++ b/source/slang/slang-ir-peephole.cpp
@@ -960,7 +960,8 @@ struct PeepholeContext : InstPassBase
{
auto getTypeFromOperand = [](IRInst* operand) -> IRType*
{
- if (as<IRTypeType>(operand->getFullType()) || !operand->getFullType())
+ if (as<IRTypeType>(operand->getFullType()) || !operand->getFullType() ||
+ as<IRTypeKind>(operand->getFullType()))
return (IRType*)operand;
return operand->getFullType();
};