[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
Sun Jul 14 07:46:03 PDT 2019
RKSimon added inline comments.
================
Comment at: include/llvm/CodeGen/SelectionDAG.h:1588
+ /// Alternatively, replace all the values for which the Predicate does match
+ /// with AlternativeReplacement if it was specified.
+ void turnVectorIntoSplatVector(MutableArrayRef<SDValue> Values,
----------------
lebedev.ri wrote:
> RKSimon wrote:
> > This comment doesn't really grok well, if I've understood correctly it should be something like:
> >
> > "If Values contains values that either match the predicate and the non-matching values are the same 'splat' values, then replace all of them with the 'splat' value."
> >
> > But I'm not sure that's much better.
> Yeah, it's jumbled. Maybe this is better?
Cheers - instead of adding this to SelectionDAG, please can you just put it TargetLowering.cpp as a static helper for prepareUREMEqFold?
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:4569
+ SDValue N = REMNode->getOperand(0);
+ SDValue D = REMNode->getOperand(1);
+
----------------
REMNode.getOperand()
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63963/new/
https://reviews.llvm.org/D63963
More information about the llvm-commits
mailing list