diff --git a/src/frontend/ir/ir.cpp b/src/frontend/ir/ir.cpp index e30eefda..ae62f770 100644 --- a/src/frontend/ir/ir.cpp +++ b/src/frontend/ir/ir.cpp @@ -120,7 +120,7 @@ Value Inst::GetArg(size_t index) const { void Inst::SetArg(size_t index, Value value) { DEBUG_ASSERT(index < GetNumArgsOf(op)); - DEBUG_ASSERT(value.GetType() == GetArgTypeOf(op, index)); + DEBUG_ASSERT(value.GetType() == GetArgTypeOf(op, index) || Type::Opaque == GetArgTypeOf(op, index)); if (!args[index].IsImmediate()) { UndoUse(args[index]); diff --git a/src/frontend/ir/ir_emitter.cpp b/src/frontend/ir/ir_emitter.cpp index 63e9b8fd..7d5f9ffe 100644 --- a/src/frontend/ir/ir_emitter.cpp +++ b/src/frontend/ir/ir_emitter.cpp @@ -426,7 +426,6 @@ IR::Value IREmitter::Inst(IR::Opcode op, std::initializer_list args) DEBUG_ASSERT(args.size() == inst->NumArgs()); std::for_each(args.begin(), args.end(), [&inst, op, index = size_t(0)](const auto& v) mutable { - DEBUG_ASSERT(IR::GetArgTypeOf(op, index) == v.GetType()); inst->SetArg(index, v); index++; });