[llvm] [PowerPC][CodeGen] Expand ISD::AssertNoFPClass for ppc_fp128 (PR #152357)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 10:22:53 PDT 2025
================
@@ -1966,6 +1967,14 @@ void DAGTypeLegalizer::ExpandFloatRes_FNEG(SDNode *N, SDValue &Lo,
Hi = DAG.getNode(ISD::FNEG, dl, Hi.getValueType(), Hi);
}
+void DAGTypeLegalizer::ExpandFloatRes_AssertNoFPClass(SDNode *N, SDValue &Lo,
+ SDValue &Hi) {
+ SDLoc dl(N);
+ GetExpandedFloat(N->getOperand(0), Lo, Hi);
+ Lo = DAG.getNode(ISD::AssertNoFPClass, dl, Lo.getValueType(), Lo);
+ Hi = DAG.getNode(ISD::AssertNoFPClass, dl, Hi.getValueType(), Hi);
----------------
RolandF77 wrote:
Looking at PPCTargetLowering::LowerIS_FPCLASS, it appears that for ppcf128 the class is determined by element 1. So I think propagating the info for element 1 is correct. I don't have any evidence about element 0, so I think it should not be propagated there. I am okay with not propagating the assert for both elements for now. I don't see any type tests or asserts so it's hard to be confident that only ppcf128 reaches here, so I think ppcf128 specific stuff like element 1 is class should be if protected and there be a general clear both path.
https://github.com/llvm/llvm-project/pull/152357
More information about the llvm-commits
mailing list