[llvm] b2206d1 - [SystemZ] Fix argument type of tdc instruction.
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 10:13:52 PDT 2022
Author: Kai Nacke
Date: 2022-05-09T13:12:37-04:00
New Revision: b2206d1de3d33c8ae58433cb6c1d50b5db3417ce
URL: https://github.com/llvm/llvm-project/commit/b2206d1de3d33c8ae58433cb6c1d50b5db3417ce
DIFF: https://github.com/llvm/llvm-project/commit/b2206d1de3d33c8ae58433cb6c1d50b5db3417ce.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index db629469d0495..364b634db5ca4 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);
More information about the llvm-commits
mailing list