Skip to content

Commit 785af38

Browse files
committed
Fix checking the vector size instead of the element size
1 parent b1fe070 commit 785af38

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,8 +3305,7 @@ bool RISCVDAGToDAGISel::selectLow8BitsVSplat(SDValue N, SDValue &SplatVal) {
33053305

33063306
// We can have multiple nested nodes, so unravel them all if needed.
33073307
while (IsExtOrTrunc(N)) {
3308-
if (!N.hasOneUse() ||
3309-
N.getValueType().getSizeInBits().getKnownMinValue() < 8)
3308+
if (!N.hasOneUse() || N.getScalarValueSizeInBits() < 8)
33103309
return false;
33113310
N = N->getOperand(0);
33123311
}

0 commit comments

Comments
 (0)