[PATCH] D38312: adding pattern for broadcastm
michael zuckerman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 09:57:26 PDT 2017
m_zuckerman added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:6605
}
+// Check if the current node of build vector is a zero extended vector.
----------------
Please, add example of the pattern that you are looking for
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:6639
+ EltType = MVT::getIntegerVT(ExtVTSize);
+ NumElt = Op->getNumOperands() / Delta;
+ return ExtValue;
----------------
Use NumElts /Delta
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:6673
+ MVT EltType;
+ unsigned NumElts = 1;
+ SDValue ZeroExtended = isSplatZeroExtended(BVOp, NumElts, EltType);
----------------
Why do you set the NumElt to one?
I prefer
unsigned NumElts =BVOp->getNumOperands()
and if it equal to one exit the function (early exiting)
https://reviews.llvm.org/D38312
More information about the llvm-commits
mailing list