[PATCH] D13949: [SLP] Treat SelectInsts as reduction values.
Nadav Rotem via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 09:18:00 PDT 2015
nadav added a subscriber: nadav.
nadav added a comment.
Okay. Please go ahead and commit this patch. I do have one minor comment:
BinaryOperator *Next = dyn_cast<BinaryOperator>(NextV);
if (Next)
Stack.push_back(std::make_pair(Next, 0));
+ else if (SelectInst *SelI = dyn_cast<SelectInst>(NextV))
+ Stack.push_back(std::make_pair(SelI, 0));
else if (NextV != Phi)
return false;
}
You can rewrite this code using ‘isa<BinaryOperator>(I) || isa<SelectInst>(I)’ and use a single push_back instruction.
It is also a good idea to add some comments to this code.
-Nadav
Repository:
rL LLVM
http://reviews.llvm.org/D13949
More information about the llvm-commits
mailing list