[PATCH] D31679: Use PMADDWD to expand reduction in a loop

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 22:00:30 PDT 2017


mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34630
+  // Fill the rest of the output with 0
+  SDValue Zero = getZeroVector(Madd.getSimpleValueType(), Subtarget, DAG, DL);
+  SDValue Concat = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Madd, Zero);
----------------
danielcdh wrote:
> danielcdh wrote:
> > mkuper wrote:
> > > mkuper wrote:
> > > > Isn't Madd.getSimpleValueType() always MVT::i32?
> > > > 
> > > Just a sanity check - this is correct irrespective of whether the initial value for the reduction phi is 0 or not, right?
> > I suppose yes.
> It should be vector type instead of scalar type.
Argh, right, sorry.


https://reviews.llvm.org/D31679





More information about the llvm-commits mailing list