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 {
305305 if (Aspect.Opcode < FirstOp || Aspect.Opcode > LastOp)
306306 return {NotFound, LLT ()};
307307 const unsigned OpcodeIdx = getOpcodeIdxForOpcode (Aspect.Opcode );
308+ ArrayRef<SizeAndActionsVec> Actions;
308309 if (Aspect.Type .isPointer ()) {
309310 auto &PA = AddrSpace2PointerActions[OpcodeIdx];
310311 if (PA.find (Aspect.Type .getAddressSpace ()) == PA.end ())
311312 return {NotFound, LLT ()};
313+ Actions = PA.find (Aspect.Type .getAddressSpace ())->second ;
314+ } else {
315+ Actions = ScalarActions[OpcodeIdx];
312316 }
313- const SmallVector<SizeAndActionsVec, 1 > &Actions =
314- Aspect.Type .isPointer ()
315- ? AddrSpace2PointerActions[OpcodeIdx]
316- .find (Aspect.Type .getAddressSpace ())
317- ->second
318- : ScalarActions[OpcodeIdx];
319317 if (Aspect.Idx >= Actions.size ())
320318 return {NotFound, LLT ()};
321319 const SizeAndActionsVec &Vec = Actions[Aspect.Idx ];
You can’t perform that action at this time.
0 commit comments