File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -314,18 +314,20 @@ RegBankLegalizeRules::getRulesForOpc(MachineInstr &MI) const {
314314 Opc == AMDGPU::G_INTRINSIC_W_SIDE_EFFECTS ||
315315 Opc == AMDGPU::G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS) {
316316 unsigned IntrID = cast<GIntrinsic>(MI).getIntrinsicID ();
317- if (!IRulesAlias.contains (IntrID)) {
317+ auto IRAIt = IRulesAlias.find (IntrID);
318+ if (IRAIt == IRulesAlias.end ()) {
318319 LLVM_DEBUG (dbgs () << " MI: " ; MI.dump (););
319320 llvm_unreachable (" No rules defined for intrinsic opcode" );
320321 }
321- return IRules.at (IRulesAlias. at (IntrID) );
322+ return IRules.at (IRAIt-> second );
322323 }
323324
324- if (!GRulesAlias.contains (Opc)) {
325+ auto GRAIt = GRulesAlias.find (Opc);
326+ if (GRAIt == GRulesAlias.end ()) {
325327 LLVM_DEBUG (dbgs () << " MI: " ; MI.dump (););
326328 llvm_unreachable (" No rules defined for generic opcode" );
327329 }
328- return GRules.at (GRulesAlias. at (Opc) );
330+ return GRules.at (GRAIt-> second );
329331}
330332
331333// Syntactic sugar wrapper for predicate lambda that enables '&&', '||' and '!'.
You can’t perform that action at this time.
0 commit comments