@@ -1150,23 +1150,23 @@ LLT llvm::getGCDType(LLT OrigTy, LLT TargetTy) {
1150
1150
llvm_unreachable (
1151
1151
" getGCDType not implemented between fixed and scalable vectors." );
1152
1152
1153
- unsigned GCD = std::gcd (OrigTy.getElementCount ().getKnownMinValue () *
1154
- OrigElt.getSizeInBits ().getFixedValue (),
1155
- TargetTy.getElementCount ().getKnownMinValue () *
1156
- TargetElt.getSizeInBits ().getFixedValue ());
1157
- if (GCD == OrigElt.getSizeInBits ())
1158
- return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1159
- OrigElt);
1160
-
1161
- // Cannot produce original element type, but both have vscale in common.
1162
- if (GCD < OrigElt.getSizeInBits ())
1163
- return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1164
- GCD);
1165
-
1166
- return LLT::vector (
1167
- ElementCount::get (GCD / OrigElt.getSizeInBits ().getFixedValue (),
1168
- OrigTy.isScalable ()),
1169
- OrigElt);
1153
+ unsigned GCD = std::gcd (OrigTy.getElementCount ().getKnownMinValue () *
1154
+ OrigElt.getSizeInBits ().getFixedValue (),
1155
+ TargetTy.getElementCount ().getKnownMinValue () *
1156
+ TargetElt.getSizeInBits ().getFixedValue ());
1157
+ if (GCD == OrigElt.getSizeInBits ())
1158
+ return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1159
+ OrigElt);
1160
+
1161
+ // Cannot produce original element type, but both have vscale in common.
1162
+ if (GCD < OrigElt.getSizeInBits ())
1163
+ return LLT::scalarOrVector (ElementCount::get (1 , OrigTy.isScalable ()),
1164
+ GCD);
1165
+
1166
+ return LLT::vector (
1167
+ ElementCount::get (GCD / OrigElt.getSizeInBits ().getFixedValue (),
1168
+ OrigTy.isScalable ()),
1169
+ OrigElt);
1170
1170
}
1171
1171
1172
1172
// If one type is vector and the element size matches the scalar size, then
0 commit comments