[PATCH] D139311: InstCombine: Match pattern that appears in clang's __builtin_isnormal

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 23:05:51 PST 2022


foad added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1229
+/// and (fcmp ord x, 0), (fcmp u* x, inf) -> fcmp o* x, y
+/// and (fcmp ord x, 0), (fcmp u* fabs(x), inf) -> fcmp o* x, y
+///
----------------
arsenm wrote:
> foad wrote:
> > Comment seems wrong - this function doesn't do anything with fabs.
> It's not wrong, it's just the fabs stripping is applied in the predicate where it's called
I think the comment on this function should say what this function does. I can't see how this function strips anything. Also what is `y` in the comment?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139311/new/

https://reviews.llvm.org/D139311



More information about the llvm-commits mailing list