Skip to content

Commit 23323e2

Browse files
authored
[TargetLowering][RISCV] Propagate fastmath flags for the vector operations emitted in expandVecReduce. (#85164)
We used the fastmath flags for any scalar ops created, but not vector.
1 parent 65c0143 commit 23323e2

File tree

2 files changed

+229
-659
lines changed

2 files changed

+229
-659
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10694,7 +10694,7 @@ SDValue TargetLowering::expandVecReduce(SDNode *Node, SelectionDAG &DAG) const {
1069410694

1069510695
SDValue Lo, Hi;
1069610696
std::tie(Lo, Hi) = DAG.SplitVector(Op, dl);
10697-
Op = DAG.getNode(BaseOpcode, dl, HalfVT, Lo, Hi);
10697+
Op = DAG.getNode(BaseOpcode, dl, HalfVT, Lo, Hi, Node->getFlags());
1069810698
VT = HalfVT;
1069910699
}
1070010700
}

0 commit comments

Comments
 (0)