diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-03-18 18:40:07 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-03-18 18:40:07 +0000 |
commit | 664c1ef52849623ef509e34968e0807a21b7bf15 (patch) | |
tree | d66a806e4012afe2dce825f3289595becfb0ff9c /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | f6a53d63a10078a5150fd1f9c867e7714ea21417 (diff) | |
download | bcm5719-llvm-664c1ef52849623ef509e34968e0807a21b7bf15.tar.gz bcm5719-llvm-664c1ef52849623ef509e34968e0807a21b7bf15.zip |
[TargetLowering] Add code size information on isFPImmLegal. NFC
This allows better code size for aarch64 floating point materialization
in a future patch.
Reviewers: evandro
Differential Revision: https://reviews.llvm.org/D58690
llvm-svn: 356389
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-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 4c7004c929c..a756e837ee9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3092,7 +3092,8 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(Node); // Check to see if this FP immediate is already legal. // If this is a legal constant, turn it into a TargetConstantFP node. - if (!TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0))) + if (!TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0), + DAG.getMachineFunction().getFunction().optForSize())) Results.push_back(ExpandConstantFP(CFP, true)); break; } |