[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 06:29:16 PST 2022
foad added inline comments.
================
Comment at: llvm/include/llvm/IR/InstrTypes.h:839
+ /// For example, UEQ -> OEQ, ULT -> OLT, OEQ -> OEQ
+ static Predicate getOrderedPredicate(Predicate pred) {
+ return static_cast<Predicate>(pred & FCMP_ORD);
----------------
Argument name should be capitalized (though the existing functions are inconsistent on this).
================
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
+///
----------------
Comment seems wrong - this function doesn't do anything with fabs.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1309
+ if (IsAnd && stripSignOnlyFPOps(LHS0) == stripSignOnlyFPOps(RHS0)) {
+ if (Value *Left = matchOrdAndUnorderedCmpInf(Builder, LHS, RHS))
----------------
Do you need to worry about IsLogicalSelect here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139311/new/
https://reviews.llvm.org/D139311
More information about the llvm-commits
mailing list