File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
llvm/lib/CodeGen/GlobalISel Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -305,17 +305,15 @@ LegacyLegalizerInfo::findScalarLegalAction(const InstrAspect &Aspect) const {
305
305
if (Aspect.Opcode < FirstOp || Aspect.Opcode > LastOp)
306
306
return {NotFound, LLT ()};
307
307
const unsigned OpcodeIdx = getOpcodeIdxForOpcode (Aspect.Opcode );
308
+ ArrayRef<SizeAndActionsVec> Actions;
308
309
if (Aspect.Type .isPointer ()) {
309
310
auto &PA = AddrSpace2PointerActions[OpcodeIdx];
310
311
if (PA.find (Aspect.Type .getAddressSpace ()) == PA.end ())
311
312
return {NotFound, LLT ()};
313
+ Actions = PA.find (Aspect.Type .getAddressSpace ())->second ;
314
+ } else {
315
+ Actions = ScalarActions[OpcodeIdx];
312
316
}
313
- const SmallVector<SizeAndActionsVec, 1 > &Actions =
314
- Aspect.Type .isPointer ()
315
- ? AddrSpace2PointerActions[OpcodeIdx]
316
- .find (Aspect.Type .getAddressSpace ())
317
- ->second
318
- : ScalarActions[OpcodeIdx];
319
317
if (Aspect.Idx >= Actions.size ())
320
318
return {NotFound, LLT ()};
321
319
const SizeAndActionsVec &Vec = Actions[Aspect.Idx ];
You can’t perform that action at this time.
0 commit comments