[llvm-commits] [llvm] r161053 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Micah Villmow
villmow at gmail.com
Tue Jul 31 09:48:03 PDT 2012
Author: villmow
Date: Tue Jul 31 11:48:03 2012
New Revision: 161053
URL: http://llvm.org/viewvc/llvm-project?rev=161053&view=rev
Log:
Don't generate ordered or unordered comparison operations if it is not legal to do so.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=161053&r1=161052&r2=161053&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Jul 31 11:48:03 2012
@@ -2464,7 +2464,8 @@
// 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::SETO : ISD::SETUO;
- if (NewCond != Cond)
+ if (NewCond != Cond && (DCI.isBeforeLegalizeOps()
+ || getCondCodeAction(NewCond, N0.getValueType()) == Legal))
return DAG.getSetCC(dl, VT, N0, N1, NewCond);
}
More information about the llvm-commits
mailing list