diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-10-25 23:47:25 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-10-25 23:47:25 +0000 |
commit | d8f2a1a0f37f39fb4763aab6a03d2c58d32d481b (patch) | |
tree | e96783d3628539286433dea13dd7af94df9b6319 /llvm/lib/CodeGen | |
parent | 81ff73ec46c490cfc6e57c0ffeb348c81e001337 (diff) | |
download | bcm5719-llvm-d8f2a1a0f37f39fb4763aab6a03d2c58d32d481b.tar.gz bcm5719-llvm-d8f2a1a0f37f39fb4763aab6a03d2c58d32d481b.zip |
Allow custom lowered FP_TO_SINT ops in the check for whether a larger
FP_TO_SINT is preferred to a larger FP_TO_UINT. This seems to be begging
for a TLI.isOperationCustom() helper function.
llvm-svn: 23992
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index a065d90c6bc..e17a9080cc3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2266,7 +2266,8 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) { // legal, such as PowerPC. if (Node->getOpcode() == ISD::FP_TO_UINT && !TLI.isOperationLegal(ISD::FP_TO_UINT, NVT) && - TLI.isOperationLegal(ISD::FP_TO_SINT, NVT)) { + (TLI.isOperationLegal(ISD::FP_TO_SINT, NVT) || + TLI.getOperationAction(ISD::FP_TO_SINT, NVT)==TargetLowering::Custom)){ Result = DAG.getNode(ISD::FP_TO_SINT, NVT, Tmp1); } else { Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); |