[PATCH] D103169: [FPEnv][InstSimplify] Constrained FP support for NaN
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 11:52:51 PDT 2021
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for a couple of minor points. Thanks for working on this!
================
Comment at: llvm/include/llvm/IR/FPEnv.h:58
+/// match what is used in the default floating point environment.
+inline bool IsDefaultFPEnvironment(fp::ExceptionBehavior eb, RoundingMode rm) {
+ return eb == fp::ebIgnore && rm == RoundingMode::NearestTiesToEven;
----------------
Nit - capitalization is opposite of current guidelines:
isDefaultFPEnvironment(fp::ExceptionBehavior EB, RoundingMode RM)
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:478-482
+ Optional<fp::ExceptionBehavior> ExBehavior = FPI->getExceptionBehavior();
+ if (ExBehavior.hasValue())
+ return (ExBehavior.getValue() != fp::ebStrict);
+ else
+ return true;
----------------
Reduces to:
return FPI->getExceptionBehavior() != fp::ebStrict;
?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103169/new/
https://reviews.llvm.org/D103169
More information about the llvm-commits
mailing list