@@ -1177,23 +1177,23 @@ LLT llvm::getGCDType(LLT OrigTy, LLT TargetTy) {
1177
1177
llvm_unreachable (
1178
1178
" getGCDType not implemented between fixed and scalable vectors." );
1179
1179
1180
- unsigned GCD = std::gcd (OrigTy.getElementCount ().getKnownMinValue () *
1181
- OrigElt.getSizeInBits ().getFixedValue (),
1182
- TargetTy.getElementCount ().getKnownMinValue () *
1183
- TargetElt.getSizeInBits ().getFixedValue ());
1184
- if (GCD == OrigElt.getSizeInBits ())
1185
- return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1186
- OrigElt);
1187
-
1188
- // Cannot produce original element type, but both have vscale in common.
1189
- if (GCD < OrigElt.getSizeInBits ())
1190
- return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1191
- GCD);
1192
-
1193
- return LLT::vector (
1194
- ElementCount::get (GCD / OrigElt.getSizeInBits ().getFixedValue (),
1195
- OrigTy.isScalable ()),
1196
- OrigElt);
1180
+ unsigned GCD = std::gcd (OrigTy.getElementCount ().getKnownMinValue () *
1181
+ OrigElt.getSizeInBits ().getFixedValue (),
1182
+ TargetTy.getElementCount ().getKnownMinValue () *
1183
+ TargetElt.getSizeInBits ().getFixedValue ());
1184
+ if (GCD == OrigElt.getSizeInBits ())
1185
+ return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1186
+ OrigElt);
1187
+
1188
+ // Cannot produce original element type, but both have vscale in common.
1189
+ if (GCD < OrigElt.getSizeInBits ())
1190
+ return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1191
+ GCD);
1192
+
1193
+ return LLT::vector (
1194
+ ElementCount::get (GCD / OrigElt.getSizeInBits ().getFixedValue (),
1195
+ OrigTy.isScalable ()),
1196
+ OrigElt);
1197
1197
}
1198
1198
1199
1199
// If one type is vector and the element size matches the scalar size, then
0 commit comments