Skip to content

Commit b38f31a

Browse files
committed
[RISCV] Ruse an existing variable to shorten a line [nfc]
1 parent c0a9722 commit b38f31a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3521,11 +3521,9 @@ static SDValue lowerBuildVectorOfConstants(SDValue Op, SelectionDAG &DAG,
35213521
// by vrgather.vv. This covers all indice vectors up to size 4.
35223522
// TODO: We really should be costing the smaller vector. There are
35233523
// profitable cases this misses.
3524-
const unsigned ScalarSize =
3525-
Op.getSimpleValueType().getScalarSizeInBits();
3526-
if (ScalarSize > 8 && NumElts <= 4) {
3524+
if (EltBitSize > 8 && NumElts <= 4) {
35273525
unsigned SignBits = DAG.ComputeNumSignBits(Op);
3528-
if (ScalarSize - SignBits < 8) {
3526+
if (EltBitSize - SignBits < 8) {
35293527
SDValue Source =
35303528
DAG.getNode(ISD::TRUNCATE, DL, VT.changeVectorElementType(MVT::i8), Op);
35313529
Source = convertToScalableVector(ContainerVT.changeVectorElementType(MVT::i8),

0 commit comments

Comments
 (0)