[PATCH] D116039: [X86] Combine reduce (add (mul x, y)) to VNNI instruction.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 25 22:13:30 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:42162-42163
+  EVT VT = Extract->getOperand(0).getValueType();
+  if (!isPowerOf2_32(VT.getVectorNumElements()))
+    return SDValue();
+
----------------
pengfei wrote:
> Can check `DCI.isAfterLegalizeDAG()` before calling the function instead?
I don't think that works. We should be able to handle 32 x i8 and 64 x i8 which would have zero_extend and sign_extend with illegal result types.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116039



More information about the llvm-commits mailing list