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 {
314
314
Opc == AMDGPU::G_INTRINSIC_W_SIDE_EFFECTS ||
315
315
Opc == AMDGPU::G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS) {
316
316
unsigned IntrID = cast<GIntrinsic>(MI).getIntrinsicID ();
317
- if (!IRulesAlias.contains (IntrID)) {
317
+ auto IRAIt = IRulesAlias.find (IntrID);
318
+ if (IRAIt == IRulesAlias.end ()) {
318
319
LLVM_DEBUG (dbgs () << " MI: " ; MI.dump (););
319
320
llvm_unreachable (" No rules defined for intrinsic opcode" );
320
321
}
321
- return IRules.at (IRulesAlias. at (IntrID) );
322
+ return IRules.at (IRAIt-> second );
322
323
}
323
324
324
- if (!GRulesAlias.contains (Opc)) {
325
+ auto GRAIt = GRulesAlias.find (Opc);
326
+ if (GRAIt == GRulesAlias.end ()) {
325
327
LLVM_DEBUG (dbgs () << " MI: " ; MI.dump (););
326
328
llvm_unreachable (" No rules defined for generic opcode" );
327
329
}
328
- return GRules.at (GRulesAlias. at (Opc) );
330
+ return GRules.at (GRAIt-> second );
329
331
}
330
332
331
333
// Syntactic sugar wrapper for predicate lambda that enables '&&', '||' and '!'.
You can’t perform that action at this time.
0 commit comments