[PATCH] D139130: InstCombine: Fold and (fcmp), (is.fpclass) into is.fpclass
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 06:26:54 PST 2022
foad added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1243
+ return {LHS, fcZero};
+ case FCmpInst::FCMP_UEQ: // match !(x != 0.0)
+ return {LHS, fcZero | fcNan};
----------------
arsenm wrote:
> foad wrote:
> > Using `!=` in the comment is misleading since that is true for nans. Maybe use `<>` instead or just spell out what you mean.
> It's not misleading, that this is true for nans is the point. It's the negation of the usual syntactic ordered compare
This comment is misleading: `case FCmpInst::FCMP_UEQ: // match !(x != 0.0)`
`!(x != 0.0)` (in C) is the same as `x == 0.0` (in C) which is OEQ not UEQ.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139130/new/
https://reviews.llvm.org/D139130
More information about the llvm-commits
mailing list