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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 03:56:53 PDT 2019


RKSimon added a comment.

A couple of minors



================
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?
----------------
I haven't used find_if_not before - so this is guaranteed to return nullptr for no match?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4521
+
+  EVT VT = REMNode->getValueType(0);
+  EVT SVT = VT.getScalarType();
----------------
REMNode.getValueType() ?


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