diff --git a/source/opt/mem_pass.cpp b/source/opt/mem_pass.cpp index 6f23c932fd..13364da0ca 100644 --- a/source/opt/mem_pass.cpp +++ b/source/opt/mem_pass.cpp @@ -117,8 +117,8 @@ ir::Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { } ir::Instruction* MemPass::GetPtr(ir::Instruction* ip, uint32_t* varId) { - const SpvOp op = ip->opcode(); - assert(op == SpvOpStore || op == SpvOpLoad || op == SpvOpImageTexelPointer); + assert(ip->opcode() == SpvOpStore || ip->opcode() == SpvOpLoad || + ip->opcode() == SpvOpImageTexelPointer); // All of these opcode place the pointer in position 0. const uint32_t ptrId = ip->GetSingleWordInOperand(0);