From 22a0edd070e4a40447e0dd2699bebfd01de7a5ab Mon Sep 17 00:00:00 2001 From: Pengfei Wang Date: Thu, 21 Nov 2019 17:17:19 -0800 Subject: [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 --- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp') 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) -- cgit v1.2.3