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

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 10:43:45 PDT 2017


davide added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:88-92
+  // TODO: There are 16 FCMP predicates. Should others be (not) canonical?
+  case CmpInst::FCMP_ONE:
+  case CmpInst::FCMP_OLE:
+  case CmpInst::FCMP_OGE:
+    return false;
----------------
Given that was about 11 years ago, it's unlikely we're going to find out.
That said, I'm not sure this is relevant anymore so we might reconsider.


================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:95-96
+    return true;
+  }
+}
+
----------------
I think GCC might complain about this so you might consider adding an `llvm_unreachable` at the end of this.


https://reviews.llvm.org/D33247





More information about the llvm-commits mailing list