[PATCH] D63963: [Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 04:10:15 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4468
+  // Is there a value for which the Predicate does *NOT* match? What is it?
+  if (SDValue *SplatValue = llvm::find_if_not(Values, Predicate)) {
+    // Does Values consist only of SplatValue's and values matching Predicate?
----------------
RKSimon wrote:
> I haven't used find_if_not before - so this is guaranteed to return nullptr for no match?
Whoops, neither llvm wrappers nor the STL versions return nullptr here, this should be checking for `!= Values.end()`
Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63963/new/

https://reviews.llvm.org/D63963





More information about the llvm-commits mailing list