[RISCV] Simplify some code in vector fp<->int handling. NFC

We changed the way container types are selected since this code
was written. We no longer need to use the largest type.
This commit is contained in:
Craig Topper 2022-09-16 12:55:31 -07:00
parent c0bc461999
commit 61595c45af
1 changed files with 4 additions and 10 deletions
llvm/lib/Target/RISCV

View File

@ -3581,16 +3581,10 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
break;
}
MVT ContainerVT, SrcContainerVT;
// Derive the reference container type from the larger vector type.
if (SrcEltSize > EltSize) {
SrcContainerVT = getContainerForFixedLengthVector(SrcVT);
ContainerVT =
SrcContainerVT.changeVectorElementType(VT.getVectorElementType());
} else {
ContainerVT = getContainerForFixedLengthVector(VT);
SrcContainerVT = ContainerVT.changeVectorElementType(SrcEltVT);
}
MVT ContainerVT = getContainerForFixedLengthVector(VT);
MVT SrcContainerVT = getContainerForFixedLengthVector(SrcVT);
assert(ContainerVT.getVectorElementCount() == SrcContainerVT.getVectorElementCount() &&
"Expected same element count");
SDValue Mask, VL;
std::tie(Mask, VL) = getDefaultVLOps(VT, ContainerVT, DL, DAG, Subtarget);