[PATCH] D125230: [SystemZ] Fix argument type of tdc instruction.
Kai Nacke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 07:00:48 PDT 2022
Kai created this revision.
Kai added reviewers: uweigand, yusra.syeda, jonpa.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Kai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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`.
https://reviews.llvm.org/D125230
Files:
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Index: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
===================================================================
--- llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -5647,7 +5647,7 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125230.428073.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/7fcd5690/attachment.bin>
More information about the llvm-commits
mailing list