Skip to content

Commit a52c1a1

Browse files
toppercyuxuanchen1997
authored andcommitted
[RISCV] Use MVT::changeVectorElementType. NFC
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251428
1 parent e10c6a5 commit a52c1a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8273,11 +8273,9 @@ SDValue RISCVTargetLowering::lowerVectorTruncLike(SDValue Op,
82738273
getDefaultVLOps(SrcVT, ContainerVT, DL, DAG, Subtarget);
82748274
}
82758275

8276-
LLVMContext &Context = *DAG.getContext();
8277-
const ElementCount Count = ContainerVT.getVectorElementCount();
82788276
do {
82798277
SrcEltVT = MVT::getIntegerVT(SrcEltVT.getSizeInBits() / 2);
8280-
EVT ResultVT = EVT::getVectorVT(Context, SrcEltVT, Count);
8278+
MVT ResultVT = ContainerVT.changeVectorElementType(SrcEltVT);
82818279
Result = DAG.getNode(RISCVISD::TRUNCATE_VECTOR_VL, DL, ResultVT, Result,
82828280
Mask, VL);
82838281
} while (SrcEltVT != DstEltVT);

0 commit comments

Comments
 (0)