Skip to content

Commit a3ae7b6

Browse files
committed
[RISCV] Minor style cleanup to cf17a24 [nfc]
This was suggested in another related review, so backporting it to the existing code as well.
1 parent 45139ab commit a3ae7b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7920,8 +7920,7 @@ SDValue RISCVTargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op,
79207920
MVT M1VT = getLMUL1VT(ContainerVT);
79217921
unsigned OrigIdx = IdxC->getZExtValue();
79227922
EVT ElemVT = VecVT.getVectorElementType();
7923-
unsigned ElemSize = ElemVT.getSizeInBits().getKnownMinValue();
7924-
unsigned ElemsPerVReg = MinVLen / ElemSize;
7923+
unsigned ElemsPerVReg = MinVLen / ElemVT.getFixedSizeInBits();
79257924
unsigned RemIdx = OrigIdx % ElemsPerVReg;
79267925
unsigned SubRegIdx = OrigIdx / ElemsPerVReg;
79277926
unsigned ExtractIdx =

0 commit comments

Comments
 (0)