diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-26 17:16:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-26 17:16:00 +0000 |
commit | df1cbdd645f654032cd5660b72804ad64a685989 (patch) | |
tree | 8c862328fdcc7eb0dc3817bbb9c3e30b40269add /llvm/lib/CodeGen | |
parent | 7df0d5853581e4424ecfbede773713ee88fcfad1 (diff) | |
download | bcm5719-llvm-df1cbdd645f654032cd5660b72804ad64a685989.tar.gz bcm5719-llvm-df1cbdd645f654032cd5660b72804ad64a685989.zip |
duncan points out that isOperationLegal includes a check for
type legality. Thanks Duncan!
llvm-svn: 52786
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index d39d43e5778..64aa7ed5e82 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3852,7 +3852,7 @@ SDOperand DAGCombiner::visitSINT_TO_FP(SDNode *N) { // If the input is a legal type, and SINT_TO_FP is not legal on this target, // but UINT_TO_FP is legal on this target, try to convert. - if (TLI.isTypeLegal(OpVT) && !TLI.isOperationLegal(ISD::SINT_TO_FP, OpVT) && + if (!TLI.isOperationLegal(ISD::SINT_TO_FP, OpVT) && TLI.isOperationLegal(ISD::UINT_TO_FP, OpVT)) { // If the sign bit is known to be zero, we can change this to UINT_TO_FP. if (DAG.SignBitIsZero(N0)) @@ -3875,7 +3875,7 @@ SDOperand DAGCombiner::visitUINT_TO_FP(SDNode *N) { // If the input is a legal type, and UINT_TO_FP is not legal on this target, // but SINT_TO_FP is legal on this target, try to convert. - if (TLI.isTypeLegal(OpVT) && !TLI.isOperationLegal(ISD::UINT_TO_FP, OpVT) && + if (!TLI.isOperationLegal(ISD::UINT_TO_FP, OpVT) && TLI.isOperationLegal(ISD::SINT_TO_FP, OpVT)) { // If the sign bit is known to be zero, we can change this to SINT_TO_FP. if (DAG.SignBitIsZero(N0)) |