[SelectionDAG] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D117235

This commit is contained in:
Fangrui Song 2022-01-15 17:13:09 -08:00
parent 4c1e1e05cb
commit 5456249736

View File

@ -4368,13 +4368,13 @@ SDValue DAGTypeLegalizer::WidenVecRes_VP_LOAD(VPLoadSDNode *N) {
SDLoc dl(N);
// The mask should be widened as well
assert(getTypeAction(Mask.getValueType()) == TargetLowering::TypeWidenVector &&
assert(getTypeAction(Mask.getValueType()) ==
TargetLowering::TypeWidenVector &&
"Unable to widen binary VP op");
EVT WideMaskVT =
TLI.getTypeToTransformTo(*DAG.getContext(), Mask.getValueType());
Mask = GetWidenedVector(Mask);
assert(Mask.getValueType().getVectorElementCount() ==
WideMaskVT.getVectorElementCount() &&
TLI.getTypeToTransformTo(*DAG.getContext(), Mask.getValueType())
.getVectorElementCount() &&
"Unable to widen vector load");
SDValue Res =
@ -5288,8 +5288,8 @@ SDValue DAGTypeLegalizer::WidenVecOp_VP_STORE(SDNode *N, unsigned OpNo) {
// We only handle the case where the stored value needs widening to an
// identically-sized type as the mask.
EVT ValueVT = StVal.getValueType();
assert(getTypeAction(ValueVT) == TargetLowering::TypeWidenVector &&
assert(getTypeAction(StVal.getValueType()) ==
TargetLowering::TypeWidenVector &&
"Unable to widen VP store");
StVal = GetWidenedVector(StVal);
}