diff options
author | Pengfei Wang <pengfei.wang@intel.com> | 2019-11-21 17:17:19 -0800 |
---|---|---|
committer | Pengfei Wang <pengfei.wang@intel.com> | 2019-11-21 18:07:11 -0800 |
commit | 22a0edd070e4a40447e0dd2699bebfd01de7a5ab (patch) | |
tree | 0e148ab708348759b6281c6c6475c31f98cdf21c /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
parent | fa09dddd70c557bd3e78bbeef1511e737c4b8049 (diff) | |
download | bcm5719-llvm-22a0edd070e4a40447e0dd2699bebfd01de7a5ab.tar.gz bcm5719-llvm-22a0edd070e4a40447e0dd2699bebfd01de7a5ab.zip |
[FPEnv] Add an option to disable strict float node mutating to an normal
float node
This patch add an option 'disable-strictnode-mutation' to prevent strict
node mutating to an normal node.
So we can make sure that the patch which sets strict-node as legal works
correctly.
Patch by Chen Liu(LiuChen3)
Differential Revision: https://reviews.llvm.org/D70226
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index ac4c83e8148..2770d512c78 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -319,9 +319,9 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) { // best approach, except in the case where the resulting strict (scalar) // operations would themselves use the fallback mutation to non-strict. // In that specific case, just do the fallback on the vector op. - if (Action == TargetLowering::Expand && + if (Action == TargetLowering::Expand && !TLI.isStrictFPEnabled() && TLI.getStrictFPOperationAction(Node->getOpcode(), - Node->getValueType(0)) + Node->getValueType(0)) == TargetLowering::Legal) { EVT EltVT = Node->getValueType(0).getVectorElementType(); if (TLI.getOperationAction(Node->getOpcode(), EltVT) |