Skip to content

Commit 5aa1119

Browse files
committed
GlobalISel: Assert if MoreElements uses a non-vector type
1 parent d934599 commit 5aa1119

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ static bool mutationIsSane(const LegalizeRule &Rule,
148148
if (NewTy.getNumElements() <= OldElts)
149149
return false;
150150
}
151-
}
151+
} else if (Rule.getAction() == MoreElements)
152+
return false;
152153

153154
// Make sure the element type didn't change.
154155
return NewTy.getScalarType() == OldTy.getScalarType();

0 commit comments

Comments
 (0)