File tree 1 file changed +3
-5
lines changed
llvm/lib/CodeGen/GlobalISel 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1164,18 +1164,16 @@ LLT llvm::getGCDType(LLT OrigTy, LLT TargetTy) {
1164
1164
1165
1165
if (OrigTy.isVector () && TargetTy.isVector ()) {
1166
1166
LLT OrigElt = OrigTy.getElementType ();
1167
- LLT TargetElt = TargetTy.getElementType ();
1168
1167
1169
1168
// TODO: The docstring for this function says the intention is to use this
1170
1169
// function to build MERGE/UNMERGE instructions. It won't be the case that
1171
1170
// we generate a MERGE/UNMERGE between fixed and scalable vector types. We
1172
1171
// could implement getGCDType between the two in the future if there was a
1173
1172
// need, but it is not worth it now as this function should not be used in
1174
1173
// that way.
1175
- if ((OrigTy.isScalableVector () && TargetTy.isFixedVector ()) ||
1176
- (OrigTy.isFixedVector () && TargetTy.isScalableVector ()))
1177
- llvm_unreachable (
1178
- " getGCDType not implemented between fixed and scalable vectors." );
1174
+ assert (((OrigTy.isScalableVector () && !TargetTy.isFixedVector ()) ||
1175
+ (OrigTy.isFixedVector () && !TargetTy.isScalableVector ())) &&
1176
+ " getGCDType not implemented between fixed and scalable vectors." );
1179
1177
1180
1178
unsigned GCD = std::gcd (OrigTy.getSizeInBits ().getKnownMinValue (),
1181
1179
TargetTy.getSizeInBits ().getKnownMinValue ());
You can’t perform that action at this time.
0 commit comments