Skip to content

Commit e9e22e0

Browse files
fixup! simplify known min size calculation
1 parent 4866dd6 commit e9e22e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/GlobalISel/Utils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,10 +1177,8 @@ 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());
1180+
unsigned GCD = std::gcd(OrigTy.getSizeInBits().getKnownMinValue(),
1181+
TargetTy.getSizeInBits().getKnownMinValue());
11841182
if (GCD == OrigElt.getSizeInBits())
11851183
return LLT::scalarOrVector(ElementCount::get(1, OrigTy.isScalable()),
11861184
OrigElt);

0 commit comments

Comments
 (0)