[PATCH] D28777: [InstCombine][SSE] Add DemandedElts support for PACKSS/PACKUS instructions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 07:25:46 PST 2017

RKSimon added a comment.

I've removed the demanded elts handling of pshufb/vpermil from  InstCombiner::visitCallInst

Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1527
+      for (unsigned i = 0; i != NumLanes; ++i) {
+        APInt LaneElts2 = UndefElts2.lshr(InnerVWidthPerLane * i);
+        APInt LaneElts3 = UndefElts3.lshr(InnerVWidthPerLane * i);
mkuper wrote:
> Maybe make UndefElts an array of 2 APInts? This will make this code slightly prettier.
UndefElts is a pass by reference argument that is used by the caller so I can't do much to change it. I agree that the code is messy but it is probably as good as it can be.



More information about the llvm-commits mailing list