[PATCH] D158648: InstCombine: Introduce SimplifyDemandedUseFPClass
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 03:46:29 PDT 2023
nikic added a comment.
This looks conceptually fine to me.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1825
+ Known = computeKnownFPClass(V, DL, fcAllFlags, Depth, &TLI, &AC, CxtI, &DT);
+ if ((DemandedMask & Known.KnownFPClasses) == fcNone)
+ return PoisonValue::get(VTy);
----------------
Should this be using getFPClassConstant() instead, just like the main code path?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1846
+ case Intrinsic::fabs:
+ if (SimplifyDemandedFPClass(I, 0, llvm::fabs(DemandedMask), Known,
+ Depth + 1))
----------------
It seems like this is correct, but only because `fabs(FPClassTest)` apparently does the exact opposite of what one would expect it to do. It's really `inverse_fabs()`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158648/new/
https://reviews.llvm.org/D158648
More information about the llvm-commits
mailing list