Lines Matching full:values
154 static SmallVector<VPValue *, 4> getOperands(ArrayRef<VPValue *> Values,
157 for (VPValue *V : Values) {
165 static bool areCommutative(ArrayRef<VPValue *> Values) {
167 cast<VPInstruction>(Values[0])->getOpcode());
171 getOperands(ArrayRef<VPValue *> Values) {
173 auto *VPI = cast<VPInstruction>(Values[0]);
179 Result.push_back(getOperands(Values, 0));
183 Result.push_back(getOperands(Values, I));
190 /// Returns the opcode of Values or ~0 if they do not all agree.
191 static std::optional<unsigned> getOpcode(ArrayRef<VPValue *> Values) {
192 unsigned Opcode = cast<VPInstruction>(Values[0])->getOpcode();
193 if (any_of(Values, [Opcode](VPValue *V) {
345 void VPlanSlp::dumpBundle(ArrayRef<VPValue *> Values) {
347 for (auto *Op : Values) {
359 VPInstruction *VPlanSlp::buildGraph(ArrayRef<VPValue *> Values) {
360 assert(!Values.empty() && "Need some operands!");
363 auto I = BundleToCombined.find(to_vector<4>(Values));
367 // its values have multiple users. We only allow this, if all users of each
369 for (auto *V : Values) {
384 dumpBundle(Values);
387 if (!areVectorizable(Values))
390 assert(getOpcode(Values) && "Opcodes for all values must match");
391 unsigned ValuesOpcode = *getOpcode(Values);
394 if (areCommutative(Values)) {
397 for (auto &Operands : getOperands(Values)) {
404 if (OperandsOpcode && OperandsOpcode == getOpcode(Values)) {
438 for (VPValue *V : Values)
441 for (auto &Operands : getOperands(Values))
462 auto *Inst = cast<VPInstruction>(Values[0])->getUnderlyingInstr();
466 << *cast<VPInstruction>(Values[0]) << "\n");
467 addCombined(Values, VPI);