[PATCH] D37427: [InstCombine] canonicalize fcmp ord/uno with constants to null constant
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 12:45:09 PDT 2017
efriedma added inline comments.
================
Comment at: lib/IR/Constants.cpp:224
+ if (isa<UndefValue>(Elt))
+ continue;
+ auto *CElt = dyn_cast<ConstantFP>(Elt);
----------------
This handling of undef makes sense where you're using it, but is a bit weird for a function named "isKnownNeverNaN".
Would it make sense for this to be a utility that operates on arbitrary values, rather than constants? For example, we can assume the result of an sitofp is never a NaN.
https://reviews.llvm.org/D37427
More information about the llvm-commits
mailing list