Skip to content

Commit 371b2de

Browse files
committed
[RISCV] lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND - freeze source value before conversion to scalable type
1 parent ba6dd3f commit 371b2de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,6 +3237,9 @@ lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(SDValue Op, SelectionDAG &DAG,
32373237

32383238
SDValue Src = Op.getOperand(0);
32393239

3240+
// Freeze the source since we are increasing the number of uses.
3241+
Src = DAG.getFreeze(Src);
3242+
32403243
MVT ContainerVT = VT;
32413244
if (VT.isFixedLengthVector()) {
32423245
ContainerVT = getContainerForFixedLengthVector(DAG, VT, Subtarget);
@@ -3254,9 +3257,6 @@ lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(SDValue Op, SelectionDAG &DAG,
32543257
std::tie(Mask, VL) = getDefaultVLOps(VT, ContainerVT, DL, DAG, Subtarget);
32553258
}
32563259

3257-
// Freeze the source since we are increasing the number of uses.
3258-
Src = DAG.getFreeze(Src);
3259-
32603260
// We do the conversion on the absolute value and fix the sign at the end.
32613261
SDValue Abs = DAG.getNode(RISCVISD::FABS_VL, DL, ContainerVT, Src, Mask, VL);
32623262

0 commit comments

Comments
 (0)