forked from OSchip/llvm-project
[GlobalIsel] Fix undefined behavior if Action not set (release), it aslo crashing in debug mode.
Differential Revision: https://reviews.llvm.org/D34978 llvm-svn: 311272
This commit is contained in:
parent
b0c9753691
commit
d88dfd32f8
|
@ -162,6 +162,9 @@ public:
|
|||
/// on Ty until we find a legal type for this operation.
|
||||
Optional<LLT> findLegalizableSize(const InstrAspect &Aspect,
|
||||
function_ref<LLT(LLT)> NextType) const {
|
||||
if (Aspect.Idx >= Actions[Aspect.Opcode - FirstOp].size())
|
||||
return None;
|
||||
|
||||
LegalizeAction Action;
|
||||
const TypeMap &Map = Actions[Aspect.Opcode - FirstOp][Aspect.Idx];
|
||||
LLT Ty = Aspect.Type;
|
||||
|
|
Loading…
Reference in New Issue