[PATCH] D158648: InstCombine: Introduce SimplifyDemandedUseFPClass
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 14:08:07 PDT 2023
nikic added inline comments.
================
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);
----------------
arsenm wrote:
> nikic wrote:
> > Should this be using getFPClassConstant() instead, just like the main code path?
> No, otherwise it will infinite loop since constants will always yield the same result after simplification. The isa<UndefValue> check above is the special case that works for poison
Check that getFPClassConstant() != V?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158648/new/
https://reviews.llvm.org/D158648
More information about the llvm-commits
mailing list