[llvm] r237635 - Revert accidental change in r237633
Matthias Braun
matze at braunis.de
Mon May 18 16:18:13 PDT 2015
Author: matze
Date: Mon May 18 18:18:13 2015
New Revision: 237635
URL: http://llvm.org/viewvc/llvm-project?rev=237635&view=rev
Log:
Revert accidental change in r237633
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=237635&r1=237634&r2=237635&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 18 18:18:13 2015
@@ -2122,7 +2122,7 @@ SDValue DAGCombiner::visitSDIV(SDNode *N
// fold (sdiv c1, c2) -> c1/c2
ConstantSDNode *N0C = isConstOrConstSplat(N0);
ConstantSDNode *N1C = isConstOrConstSplat(N1);
- if (N0C && N1C && N1C->isNullValue())
+ if (N0C && N1C && !N1C->isNullValue())
return DAG.FoldConstantArithmetic(ISD::SDIV, SDLoc(N), VT, N0C, N1C);
// fold (sdiv X, 1) -> X
if (N1C && N1C->getAPIntValue() == 1LL)
More information about the llvm-commits
mailing list