Skip to content

Commit 1ea4296

Browse files
committed
[NFC] Remove from UnivariateLinearPolyBase::getValue().
This interface should not have existed in the first place, let alone be a public member. It allows calling `ElementCount::get(..)->getValue()`, which is ambiguous. The interfaces to be used are either getFixedValue() or getKnownMinValue().
1 parent f6b7bcc commit 1ea4296

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

llvm/include/llvm/Support/TypeSize.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ class UnivariateLinearPolyBase {
229229
bool isZero() const { return !Value; }
230230
bool isNonZero() const { return !isZero(); }
231231
explicit operator bool() const { return isNonZero(); }
232-
ScalarTy getValue() const { return Value; }
233232
ScalarTy getValue(unsigned Dim) const {
234233
return Dim == UnivariateDim ? Value : 0;
235234
}
@@ -294,7 +293,7 @@ class LinearPolySize : public UnivariateLinearPolyBase<LeafTy> {
294293
static LeafTy getNull() { return get(0, false); }
295294

296295
/// Returns the minimum value this size can represent.
297-
ScalarTy getKnownMinValue() const { return this->getValue(); }
296+
ScalarTy getKnownMinValue() const { return this->Value; }
298297
/// Returns whether the size is scaled by a runtime quantity (vscale).
299298
bool isScalable() const { return this->UnivariateDim == ScalableDim; }
300299
/// A return value of true indicates we know at compile time that the number

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13090,7 +13090,7 @@ static SDValue performCommonVectorExtendCombine(SDValue VectorShuffle,
1309013090
DAG.getAnyExtOrTrunc(Extend.getOperand(0), DL, PreExtendType),
1309113091
DAG.getConstant(0, DL, MVT::i64));
1309213092

13093-
std::vector<int> ShuffleMask(TargetType.getVectorElementCount().getValue());
13093+
std::vector<int> ShuffleMask(TargetType.getVectorNumElements());
1309413094

1309513095
SDValue VectorShuffleNode =
1309613096
DAG.getVectorShuffle(PreExtendVT, DL, InsertVectorNode,

llvm/unittests/Support/LinearPolyBaseTest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ TEST(UnivariateLinearPolyBase, Univariate3D_GetValue) {
124124
EXPECT_EQ(Univariate3D(42, 1).getValue(0), 0);
125125
EXPECT_EQ(Univariate3D(42, 1).getValue(1), 42);
126126
EXPECT_EQ(Univariate3D(42, 1).getValue(2), 0);
127-
128-
EXPECT_EQ(Univariate3D(42, 0).getValue(), 42);
129-
EXPECT_EQ(Univariate3D(42, 1).getValue(), 42);
130127
}
131128

132129
TEST(UnivariateLinearPolyBase, Univariate3D_Add) {

0 commit comments

Comments
 (0)