DAG: Fix typo in GET_FPENV legality check

This made GET_FPENV unusable since the DAG builder would always emit
the mem version.
This commit is contained in:
Matt Arsenault 2023-06-12 08:15:42 -04:00
parent 4a779a9b75
commit cdcbef1b14

View File

@ -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()),