================
@@ -288,6 +288,55 @@ Action *BottomUpVec::vectorizeRec(ArrayRef<Value *> Bndl,
const auto &LegalityRes = StopForDebug ? Legality.getForcedPackForDebugging()
: Legality.canVectorize(Bndl);
LLVM_DEBUG(dbgs() << DEBUG_PREFIX << "Legality: " << LegalityRes << "\n");
+
+ if (Direction == VecDirection::TopDown) {
+ auto ActionPtr = std::make_unique<Action>(&LegalityRes, Bndl,
+ ArrayRef<Value *>(), Depth);
+
+ if (LegalityRes.getSubclassID() == LegalityResultID::Widen)
+ IMaps->registerVector(Bndl, ActionPtr.get());
+
+ // Pre-order push so defs are before uses.
+ Action *Action = ActionPtr.get();
+ Actions.push_back(std::move(ActionPtr));
+
+ if (LegalityRes.getSubclassID() == LegalityResultID::Widen) {
+ // Find users of Bndl to recurse down.
+ // Group the first user of each element if they match.
+ SmallVector<Value *, 4> NextUserBndl;
+ bool CanFormUserBndl = true;
+ for (Value *V : Bndl) {
----------------
gandhi56 wrote:
Added unit tests in VecUtilsTest.cpp
https://github.com/llvm/llvm-project/pull/205249
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits