[PATCH] D41811: X86: Add pattern matching for PMADDWD
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 12:44:02 PST 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:37149
+ // Helper for examining one ADD operand.
+ auto IsBuildVectorOfExtractsFromMul = [](
+ SDValue Op, ArrayRef<unsigned> ExpectedIndices, SDValue &RetMul) {
----------------
Can't you do this in a fully general manner, checking both LHS+RHS at the same time that one is the odd and the other is the even? It seems as the moment you can only check for all_odd+all_even or all_even+all_odd.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:37171
+ Mul.getValueType().getVectorNumElements() !=
+ 2 * ExpectedIndices.size())
+ return false;
----------------
Mul.getValueType().getVectorNumElements() != (2 * e)
https://reviews.llvm.org/D41811
More information about the llvm-commits
mailing list