[PATCH] D137858: ConstantFolding: Constant fold some canonicalizes
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 07:30:03 PST 2022
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for code comment updates.
================
Comment at: llvm/include/llvm/IR/Type.h:183
+
/// Return true if this is one of the six floating-point types
bool isFloatingPointTy() const {
----------------
This comment ("six") hasn't aged well - I'd just delete it.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1948
+ const APFloat &Src) {
+ // I sure hope zero, positive and negative, is always OK to fold.
+ if (Src.isZero())
----------------
Delete the "I sure hope" - if we're coding it this way, it's the law. If there's fallout, it'll change. :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137858/new/
https://reviews.llvm.org/D137858
More information about the llvm-commits
mailing list