Fix a backwards conditional that caused an inf loop in some cases. This
authorChris Lattner <sabre@nondot.org>
Wed, 18 Jan 2006 19:13:41 +0000 (19:13 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Jan 2006 19:13:41 +0000 (19:13 +0000)
fixes: test/Regression/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25419 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 61bfd4641013496b477105bcfca9f8b9db095868..9acf75d7843eb8ebab9c1ffc422e93e60ee6c9d9 100644 (file)
@@ -2638,7 +2638,7 @@ SDOperand DAGCombiner::SimplifySetCC(MVT::ValueType VT, SDOperand N0,
       return DAG.getConstant(UOF, VT);
     // Otherwise, we can't fold it.  However, we can simplify it to SETUO/SETO
     // if it is not already.
-    ISD::CondCode NewCond = UOF == 0 ? ISD::SETUO : ISD::SETO;
+    ISD::CondCode NewCond = UOF == 0 ? ISD::SETO : ISD::SETUO;
     if (NewCond != Cond)
       return DAG.getSetCC(VT, N0, N1, NewCond);
   }