diff options
| author | Micah Villmow <villmow@gmail.com> | 2012-07-31 16:48:03 +0000 | 
|---|---|---|
| committer | Micah Villmow <villmow@gmail.com> | 2012-07-31 16:48:03 +0000 | 
| commit | 6b12f596efe9234fa3be6523e910d44d1e0cd37b (patch) | |
| tree | a0173f224847a366f9fae218e74b2baa309c76b5 /llvm/lib/CodeGen | |
| parent | 16250c7c1847184f543d8a837512765cd6eb4bda (diff) | |
| download | bcm5719-llvm-6b12f596efe9234fa3be6523e910d44d1e0cd37b.tar.gz bcm5719-llvm-6b12f596efe9234fa3be6523e910d44d1e0cd37b.zip | |
Don't generate ordered or unordered comparison operations if it is not legal to do so.
llvm-svn: 161053
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index dff9b2c36ab..172819369df 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -2464,7 +2464,8 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,      // 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);    } | 

