summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-clone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-clone.cpp')
-rw-r--r--source/slang/slang-ir-clone.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-clone.cpp b/source/slang/slang-ir-clone.cpp
index 5bb1c1210..1a020ec26 100644
--- a/source/slang/slang-ir-clone.cpp
+++ b/source/slang/slang-ir-clone.cpp
@@ -93,6 +93,9 @@ IRInst* cloneInstAndOperands(IRCloneEnv* env, IRBuilder* builder, IRInst* oldIns
auto newOperand = findCloneForOperand(env, oldOperand);
newOperands[ii] = newOperand;
+
+ if (isArithmeticInst(oldInst))
+ newType = maybeAddRateType(builder, newOperand->getFullType(), newType);
}
// Finally we create the inst with the updated operands.