Fix Instruction::IsFloatingPointFoldingAllowed()

Was looking for decorations based on opcode. Should use result_id.
This commit is contained in:
Greg Fischer 2018-11-14 15:25:51 -07:00
parent 5c334514d6
commit d4a10590b7

View File

@ -513,7 +513,7 @@ bool Instruction::IsFloatingPointFoldingAllowed() const {
bool is_nocontract = false;
context_->get_decoration_mgr()->WhileEachDecoration(
opcode_, SpvDecorationNoContraction,
result_id(), SpvDecorationNoContraction,
[&is_nocontract](const Instruction&) {
is_nocontract = true;
return false;