[PATCH] D36454: [X86] Changes to extract Horizontal addition operation for AVX-512.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 17:24:12 PDT 2017

craig.topper added inline comments.

Comment at: lib/Target/X86/X86ISelLowering.cpp:35355
+  if (Subtarget.hasAVX512() && hasUnusedLanesAVX512(N, Op0, Op1, true) &&
+      isHorizontalBinOp(Op0, Op1, true, true)) {
Don't we need to make sure this only happens on v32i16 and v16i32 types? combineAdd can get called on all sorts of types.

Comment at: lib/Target/X86/X86ISelLowering.cpp:35368
+    SmallVector<SDValue, 2> ConcatOps(2, DAG.getUNDEF(NewVT));
+    ConcatOps[0] = HADDNode;
Don't use a SmallVector for a hardcoded two elements. Just use a plain old array.


More information about the llvm-commits mailing list