Skip to content

Commit b6bbf9c

Browse files
committed
No else after return
1 parent 52ac986 commit b6bbf9c

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
@@ -17387,13 +17387,11 @@ SDValue DAGCombiner::visitFREM(SDNode *N) {
1738717387
(Flags.hasNoSignedZeros() || DAG.isKnownNonNegativeFP(N0))) {
1738817388
SDValue Div = DAG.getNode(ISD::FDIV, DL, VT, N0, N1);
1738917389
SDValue Rnd = DAG.getNode(ISD::FTRUNC, DL, VT, Div);
17390-
if (TLI.isFMAFasterThanFMulAndFAdd(DAG.getMachineFunction(), VT)) {
17390+
if (TLI.isFMAFasterThanFMulAndFAdd(DAG.getMachineFunction(), VT))
1739117391
return DAG.getNode(ISD::FMA, DL, VT, DAG.getNode(ISD::FNEG, DL, VT, Rnd),
1739217392
N1, N0);
17393-
} else {
17394-
SDValue Mul = DAG.getNode(ISD::FMUL, DL, VT, Rnd, N1);
17395-
return DAG.getNode(ISD::FSUB, DL, VT, N0, Mul);
17396-
}
17393+
SDValue Mul = DAG.getNode(ISD::FMUL, DL, VT, Rnd, N1);
17394+
return DAG.getNode(ISD::FSUB, DL, VT, N0, Mul);
1739717395
}
1739817396

1739917397
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)