reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/Vectorize/SLPVectorizer.cpp
 3725   if (E->VectorizedValue) {
 3726     LLVM_DEBUG(dbgs() << "SLP: Diamond merged for " << *E->Scalars[0] << ".\n");
 3727     return E->VectorizedValue;
 3730   Instruction *VL0 = E->getMainOp();
 3734   VectorType *VecTy = VectorType::get(ScalarTy, E->Scalars.size());
 3736   bool NeedToShuffleReuses = !E->ReuseShuffleIndices.empty();
 3738   if (E->NeedToGather) {
 3739     setInsertPointAfterBundle(E);
 3740     auto *V = Gather(E->Scalars, VecTy);
 3743                                       E->ReuseShuffleIndices, "shuffle");
 3749     E->VectorizedValue = V;
 3754       E->isAltShuffle() ? (unsigned)Instruction::ShuffleVector : E->getOpcode();
 3754       E->isAltShuffle() ? (unsigned)Instruction::ShuffleVector : E->getOpcode();
 3764                                         E->ReuseShuffleIndices, "shuffle");
 3766       E->VectorizedValue = V;
 3783         Value *Vec = vectorizeTree(E->getOperand(i));
 3793       if (!E->NeedToGather) {
 3794         Value *V = E->getSingleOperand(0);
 3795         if (!E->ReorderIndices.empty()) {
 3797           inversePermutation(E->ReorderIndices, Mask);
 3804           if (E->ReorderIndices.empty())
 3807                                           E->ReuseShuffleIndices, "shuffle");
 3809         E->VectorizedValue = V;
 3812       setInsertPointAfterBundle(E);
 3813       auto *V = Gather(E->Scalars, VecTy);
 3816                                         E->ReuseShuffleIndices, "shuffle");
 3822       E->VectorizedValue = V;
 3826       if (!E->NeedToGather) {
 3827         LoadInst *LI = cast<LoadInst>(E->getSingleOperand(0));
 3832         Value *NewV = propagateMetadata(V, E->Scalars);
 3833         if (!E->ReorderIndices.empty()) {
 3835           inversePermutation(E->ReorderIndices, Mask);
 3842               NewV, UndefValue::get(VecTy), E->ReuseShuffleIndices, "shuffle");
 3844         E->VectorizedValue = NewV;
 3847       setInsertPointAfterBundle(E);
 3848       auto *V = Gather(E->Scalars, VecTy);
 3851                                         E->ReuseShuffleIndices, "shuffle");
 3857       E->VectorizedValue = V;
 3872       setInsertPointAfterBundle(E);
 3874       Value *InVec = vectorizeTree(E->getOperand(0));
 3876       if (E->VectorizedValue) {
 3878         return E->VectorizedValue;
 3885                                         E->ReuseShuffleIndices, "shuffle");
 3887       E->VectorizedValue = V;
 3893       setInsertPointAfterBundle(E);
 3895       Value *L = vectorizeTree(E->getOperand(0));
 3896       Value *R = vectorizeTree(E->getOperand(1));
 3898       if (E->VectorizedValue) {
 3900         return E->VectorizedValue;
 3905       if (E->getOpcode() == Instruction::FCmp)
 3910       propagateIRFlags(V, E->Scalars, VL0);
 3913                                         E->ReuseShuffleIndices, "shuffle");
 3915       E->VectorizedValue = V;
 3920       setInsertPointAfterBundle(E);
 3922       Value *Cond = vectorizeTree(E->getOperand(0));
 3923       Value *True = vectorizeTree(E->getOperand(1));
 3924       Value *False = vectorizeTree(E->getOperand(2));
 3926       if (E->VectorizedValue) {
 3928         return E->VectorizedValue;
 3934                                         E->ReuseShuffleIndices, "shuffle");
 3936       E->VectorizedValue = V;
 3941       setInsertPointAfterBundle(E);
 3943       Value *Op = vectorizeTree(E->getOperand(0));
 3945       if (E->VectorizedValue) {
 3947         return E->VectorizedValue;
 3951           static_cast<Instruction::UnaryOps>(E->getOpcode()), Op);
 3952       propagateIRFlags(V, E->Scalars, VL0);
 3954         V = propagateMetadata(I, E->Scalars);
 3958                                         E->ReuseShuffleIndices, "shuffle");
 3960       E->VectorizedValue = V;
 3983       setInsertPointAfterBundle(E);
 3985       Value *LHS = vectorizeTree(E->getOperand(0));
 3986       Value *RHS = vectorizeTree(E->getOperand(1));
 3988       if (E->VectorizedValue) {
 3990         return E->VectorizedValue;
 3994           static_cast<Instruction::BinaryOps>(E->getOpcode()), LHS,
 3996       propagateIRFlags(V, E->Scalars, VL0);
 3998         V = propagateMetadata(I, E->Scalars);
 4002                                         E->ReuseShuffleIndices, "shuffle");
 4004       E->VectorizedValue = V;
 4012       bool IsReorder = E->updateStateIfReorder();
 4014         VL0 = E->getMainOp();
 4015       setInsertPointAfterBundle(E);
 4036       Value *V = propagateMetadata(LI, E->Scalars);
 4039         inversePermutation(E->ReorderIndices, Mask);
 4046                                         E->ReuseShuffleIndices, "shuffle");
 4048       E->VectorizedValue = V;
 4057       setInsertPointAfterBundle(E);
 4059       Value *VecValue = vectorizeTree(E->getOperand(0));
 4074       Value *V = propagateMetadata(ST, E->Scalars);
 4077                                         E->ReuseShuffleIndices, "shuffle");
 4079       E->VectorizedValue = V;
 4084       setInsertPointAfterBundle(E);
 4086       Value *Op0 = vectorizeTree(E->getOperand(0));
 4091         Value *OpVec = vectorizeTree(E->getOperand(j));
 4098         V = propagateMetadata(I, E->Scalars);
 4102                                         E->ReuseShuffleIndices, "shuffle");
 4104       E->VectorizedValue = V;
 4111       setInsertPointAfterBundle(E);
 4130         Value *OpVec = vectorizeTree(E->getOperand(j));
 4137       Type *Tys[] = { VectorType::get(CI->getType(), E->Scalars.size()) };
 4149       propagateIRFlags(V, E->Scalars, VL0);
 4152                                         E->ReuseShuffleIndices, "shuffle");
 4154       E->VectorizedValue = V;
 4159       assert(E->isAltShuffle() &&
 4160              ((Instruction::isBinaryOp(E->getOpcode()) &&
 4161                Instruction::isBinaryOp(E->getAltOpcode())) ||
 4162               (Instruction::isCast(E->getOpcode()) &&
 4163                Instruction::isCast(E->getAltOpcode()))) &&
 4167       if (Instruction::isBinaryOp(E->getOpcode())) {
 4168         setInsertPointAfterBundle(E);
 4169         LHS = vectorizeTree(E->getOperand(0));
 4170         RHS = vectorizeTree(E->getOperand(1));
 4172         setInsertPointAfterBundle(E);
 4173         LHS = vectorizeTree(E->getOperand(0));
 4176       if (E->VectorizedValue) {
 4178         return E->VectorizedValue;
 4182       if (Instruction::isBinaryOp(E->getOpcode())) {
 4184             static_cast<Instruction::BinaryOps>(E->getOpcode()), LHS, RHS);
 4186             static_cast<Instruction::BinaryOps>(E->getAltOpcode()), LHS, RHS);
 4189             static_cast<Instruction::CastOps>(E->getOpcode()), LHS, VecTy);
 4191             static_cast<Instruction::CastOps>(E->getAltOpcode()), LHS, VecTy);
 4198       unsigned e = E->Scalars.size();
 4201         auto *OpInst = cast<Instruction>(E->Scalars[i]);
 4202         assert(E->isOpcodeOrAlt(OpInst) && "Unexpected main/alternate opcode");
 4203         if (OpInst->getOpcode() == E->getAltOpcode()) {
 4205           AltScalars.push_back(E->Scalars[i]);
 4208           OpScalars.push_back(E->Scalars[i]);
 4218         V = propagateMetadata(I, E->Scalars);
 4221                                         E->ReuseShuffleIndices, "shuffle");
 4223       E->VectorizedValue = V;