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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 10:58:15 PDT 2017


spatel added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:95-96
+    return true;
+  }
+}
+
----------------
davide wrote:
> I think GCC might complain about this so you might consider adding an `llvm_unreachable` at the end of this.
Do you know of a case where that happens? I couldn't find one:
https://godbolt.org/g/l0XnXd
...so I'd rather not ugly up the code for something if it doesn't really happen. We could 'default: break' and return true outside of the switch if you think that reads better.


https://reviews.llvm.org/D33247





More information about the llvm-commits mailing list