From cdcbef1b14582f5b5b296bec750f60a1629ecc32 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 12 Jun 2023 08:15:42 -0400 Subject: [PATCH] DAG: Fix typo in GET_FPENV legality check This made GET_FPENV unusable since the DAG builder would always emit the mem version. --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 8afe9f5315bc..f38957637b74 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6599,7 +6599,7 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, SDValue Chain = getRoot(); // Use GET_FPENV if it is legal or custom. Otherwise use memory-based node // and temporary storage in stack. - if (TLI.isOperationLegalOrCustom(ISD::SET_FPENV, EnvVT)) { + if (TLI.isOperationLegalOrCustom(ISD::GET_FPENV, EnvVT)) { Res = DAG.getNode( ISD::GET_FPENV, sdl, DAG.getVTList(TLI.getValueType(DAG.getDataLayout(), I.getType()),