summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Fischer <greg@lunarg.com>2018-03-12 16:53:58 -0600
committerSteven Perron <31666470+s-perron@users.noreply.github.com>2018-03-12 22:06:23 -0400
commit077249b67f80bb6dfdb91a5aa872794299224c6d (patch)
tree85ab355704f0fe3fe7b9ea3c0c9c40bb4a3ce16a
parent5bd55f10cd17333bf0e5deec2471ab79389c0cc9 (diff)
downloadSPIRV-Tools-077249b67f80bb6dfdb91a5aa872794299224c6d.tar.gz
SPIRV-Tools-077249b67f80bb6dfdb91a5aa872794299224c6d.tar.bz2
SPIRV-Tools-077249b67f80bb6dfdb91a5aa872794299224c6d.zip
Fix InsertFeedingExtract rule when extract remains.
-rw-r--r--source/opt/folding_rules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/opt/folding_rules.cpp b/source/opt/folding_rules.cpp
index 6b22ae0c..a0fca0fc 100644
--- a/source/opt/folding_rules.cpp
+++ b/source/opt/folding_rules.cpp
@@ -1425,7 +1425,7 @@ FoldingRule InsertFeedingExtract() {
{cinst->GetSingleWordInOperand(kInsertObjectIdInIdx)}});
for (; i < inst->NumInOperands(); ++i) {
operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER,
- {cinst->GetSingleWordInOperand(i)}});
+ {inst->GetSingleWordInOperand(i)}});
}
inst->SetInOperands(std::move(operands));
return true;