Use opcode's is_return() rather than pattern-matching.
@@ -208,13 +208,10 @@ impl TargetIsa for Isa {
let mut return_insts = Vec::new();
for ebb in func.layout.ebbs() {
for inst in func.layout.ebb_insts(ebb) {
- if let InstructionData::MultiAry { opcode, .. } = func.dfg[inst] {
- if opcode == Opcode::Return {
+ if func.dfg[inst].opcode().is_return() {
return_insts.push(inst);
}
}
-
- }
}
// Insert an epilogue directly before every 'return'
