From b2206d1de3d33c8ae58433cb6c1d50b5db3417ce Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 9 May 2022 09:53:28 -0400 Subject: [PATCH] [SystemZ] Fix argument type of tdc instruction. The DAG node for the Test Data Class is defined using i64 as the second parameter. However, the code to lower is_fpclass uses `i32` as type. This only works because no type check is generated in the DAG matcher. This PR changes the type of the mask constant to `i64`. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D125230 --- llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index db62946..364b634 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -5647,7 +5647,7 @@ SDValue SystemZTargetLowering::lowerIS_FPCLASS(SDValue Op, TDCMask |= SystemZ::TDCMASK_ZERO_PLUS; if (Check & fcNegZero) TDCMask |= SystemZ::TDCMASK_ZERO_MINUS; - SDValue TDCMaskV = DAG.getConstant(TDCMask, DL, MVT::i32); + SDValue TDCMaskV = DAG.getConstant(TDCMask, DL, MVT::i64); SDValue Intr = DAG.getNode(SystemZISD::TDC, DL, ResultVT, Arg, TDCMaskV); return getCCResult(DAG, Intr); -- 2.7.4