Skip to content

Commit fa01fda

Browse files
fixup! clang-format
1 parent 5d37cc3 commit fa01fda

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

llvm/lib/CodeGen/GlobalISel/Utils.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,23 +1177,23 @@ LLT llvm::getGCDType(LLT OrigTy, LLT TargetTy) {
11771177
llvm_unreachable(
11781178
"getGCDType not implemented between fixed and scalable vectors.");
11791179

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);
11971197
}
11981198

11991199
// If one type is vector and the element size matches the scalar size, then

0 commit comments

Comments
 (0)