[PATCH] D32338: InstructionSimplify: Canonicalize shuffle operands. NFC-ish.

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 22 00:25:47 PDT 2017


zvi marked 5 inline comments as done.
zvi added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:4148
   for (unsigned i = 0; i != MaskNumElts; ++i) {
     int Idx = ShuffleVectorInst::getMaskValue(Mask, i);
     if (Idx == -1)
----------------
zvi wrote:
> RKSimon wrote:
> > You are calling ShuffleVectorInst::getMaskValue multiple times per element - better to call ShuffleVectorInst::getShuffleMask instead?
> Right, this is the case even without this patch (see lines 4158 and 4188). Will add a parent patch to address that.
This is done in a parent patch, D32388.


Repository:
  rL LLVM

https://reviews.llvm.org/D32338





More information about the llvm-commits mailing list