Skip to content

Commit 4866dd6

Browse files
fixup! use getScalarType
Co-authored-by: Matt Arsenault <[email protected]>
1 parent fa01fda commit 4866dd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/GlobalISel/Utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,8 @@ LLT llvm::getGCDType(LLT OrigTy, LLT TargetTy) {
12091209
// vector and one is a scalar. If both types are scalars, the GCD type is the
12101210
// GCD between the two scalar sizes. If one is vector and one is scalar, then
12111211
// the GCD type is the GCD between the scalar and the vector element size.
1212-
LLT OrigScalar = OrigTy.isVector() ? OrigTy.getElementType() : OrigTy;
1213-
LLT TargetScalar = TargetTy.isVector() ? TargetTy.getElementType() : TargetTy;
1212+
LLT OrigScalar = OrigTy.getScalarType();
1213+
LLT TargetScalar = TargetTy.getScalarType();
12141214
unsigned GCD = std::gcd(OrigScalar.getSizeInBits().getFixedValue(),
12151215
TargetScalar.getSizeInBits().getFixedValue());
12161216
return LLT::scalar(GCD);

0 commit comments

Comments
 (0)