Skip to content

Commit e6367fb

Browse files
committed
No else after return
1 parent 5042aea commit e6367fb

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17349,13 +17349,11 @@ SDValue DAGCombiner::visitFREM(SDNode *N) {
1734917349
(Flags.hasNoSignedZeros() || DAG.isKnownNonNegativeFP(N0))) {
1735017350
SDValue Div = DAG.getNode(ISD::FDIV, DL, VT, N0, N1);
1735117351
SDValue Rnd = DAG.getNode(ISD::FTRUNC, DL, VT, Div);
17352-
if (TLI.isFMAFasterThanFMulAndFAdd(DAG.getMachineFunction(), VT)) {
17352+
if (TLI.isFMAFasterThanFMulAndFAdd(DAG.getMachineFunction(), VT))
1735317353
return DAG.getNode(ISD::FMA, DL, VT, DAG.getNode(ISD::FNEG, DL, VT, Rnd),
1735417354
N1, N0);
17355-
} else {
17356-
SDValue Mul = DAG.getNode(ISD::FMUL, DL, VT, Rnd, N1);
17357-
return DAG.getNode(ISD::FSUB, DL, VT, N0, Mul);
17358-
}
17355+
SDValue Mul = DAG.getNode(ISD::FMUL, DL, VT, Rnd, N1);
17356+
return DAG.getNode(ISD::FSUB, DL, VT, N0, Mul);
1735917357
}
1736017358

1736117359
return SDValue();

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5567,7 +5567,7 @@ bool SelectionDAG::isKnownNeverZero(SDValue Op, unsigned Depth) const {
55675567

55685568
bool SelectionDAG::isKnownNonNegativeFP(SDValue Op) const {
55695569
if (ConstantFPSDNode *C1 = isConstOrConstSplatFP(Op, true))
5570-
return !C1->isNegative() && !C1->isNaN();
5570+
return !C1->isNegative();
55715571

55725572
return Op.getOpcode() == ISD::FABS;
55735573
}

0 commit comments

Comments
 (0)