[PATCH] D33247: [InstCombine] add isCanonicalPredicate() helper function and use it; NFCI

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 16:04:05 PDT 2017


efriedma accepted this revision.
efriedma added a comment.

Cleanup looks fine.



================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:91
+  case CmpInst::FCMP_OLE:
+  case CmpInst::FCMP_OGE:
+    return false;
----------------
Not sure why these three are special either... from a brief look at the commit, I would guess it was done to mirror the integer transforms, without any real consideration for what should be canonical.

If I were doing it from scratch, I might say we should consider ordered predicates canonical, since they're the ones people are used to working with.


https://reviews.llvm.org/D33247





More information about the llvm-commits mailing list