Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Shuffle

1274   // mask and shuffle within a single vector, it is worthwhile to move the
1275 // shuffle after binary operation:
1276 // Op(shuffle(v1, m), shuffle(v2, m)) -> shuffle(Op(v1, v2), m)
1291 // If one argument is a shuffle within one vector, the other is a constant,
1292 // try moving the shuffle after the binary operation.
1293 ShuffleVectorInst *Shuffle = nullptr;
1295 if (isa<ShuffleVectorInst>(LHS)) Shuffle = cast<ShuffleVectorInst>(LHS);
1296 if (isa<ShuffleVectorInst>(RHS)) Shuffle = cast<ShuffleVectorInst>(RHS);
1299 if (Shuffle && C1 &&
1301 isa<UndefValue>(Shuffle->getOperand(1)) &&
1302 Shuffle->getType() == Shuffle->getOperand(0)->getType()) {
1303 SmallVector<int, 16> ShMask = Shuffle->getShuffleMask();
1305 // shuffle(C2, ShMask) = C1
1323 Value *NewLHS = isa<Constant>(LHS) ? C2 : Shuffle->getOperand(0);
1324 Value *NewRHS = isa<Constant>(LHS) ? Shuffle->getOperand(0) : C2;
1327 UndefValue::get(Inst.getType()), Shuffle->getMask());