[llvm] SelectionDAG: Support nofpclass (PR #108350)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 06:32:34 PDT 2024
================
@@ -11773,6 +11773,14 @@ void SelectionDAGISel::LowerArguments(const Function &F) {
AssertOp = ISD::AssertSext;
else if (Arg.hasAttribute(Attribute::ZExt))
AssertOp = ISD::AssertZext;
+ if (Arg.hasAttribute(Attribute::NoFPClass)) {
+ SDNodeFlags InValFlags = InVals[i]->getFlags();
+ InValFlags.setNonNeg(Arg.getNoFPClass() & llvm::fcNegative);
+ InValFlags.setNoNaNs(Arg.getNoFPClass() & llvm::fcNan);
+ InValFlags.setNoInfs(Arg.getNoFPClass() & llvm::fcInf);
+ InValFlags.setNoSignedZeros(Arg.getNoFPClass() & llvm::fcNegZero);
----------------
wzssyqa wrote:
Yes, "the value is known not to be -0.0" is one case, and another case is that "we don't care about it".
For example `fminimum(3)` requires `-0.0<+0.0`, while in some case, we don't care about it.
https://github.com/llvm/llvm-project/pull/108350
More information about the llvm-commits
mailing list