diff --git a/llvm/include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h index b749d9ef588a..0283fdded7f4 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h @@ -318,11 +318,8 @@ private: const unsigned AddressSpace, const SizeAndActionsVec &SizeAndActions) { const unsigned OpcodeIdx = Opcode - FirstOp; - if (AddrSpace2PointerActions[OpcodeIdx].find(AddressSpace) == - AddrSpace2PointerActions[OpcodeIdx].end()) - AddrSpace2PointerActions[OpcodeIdx][AddressSpace] = {{}}; SmallVector &Actions = - AddrSpace2PointerActions[OpcodeIdx].find(AddressSpace)->second; + AddrSpace2PointerActions[OpcodeIdx][AddressSpace]; setActions(TypeIndex, Actions, SizeAndActions); } @@ -347,11 +344,8 @@ private: const unsigned ElementSize, const SizeAndActionsVec &SizeAndActions) { const unsigned OpcodeIdx = Opcode - FirstOp; - if (NumElements2Actions[OpcodeIdx].find(ElementSize) == - NumElements2Actions[OpcodeIdx].end()) - NumElements2Actions[OpcodeIdx][ElementSize] = {{}}; SmallVector &Actions = - NumElements2Actions[OpcodeIdx].find(ElementSize)->second; + NumElements2Actions[OpcodeIdx][ElementSize]; setActions(TypeIndex, Actions, SizeAndActions); }