[llvm] [LV] Limits the splat operations be hoisted must not be defined by a recipe. (PR #117138)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 06:39:21 PST 2025
================
@@ -264,7 +265,11 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
return Data.VPV2Vector[Def];
auto GetBroadcastInstrs = [this, Def](Value *V) {
- bool SafeToHoist = Def->isDefinedOutsideLoopRegions();
+ bool SafeToHoist =
+ !Def->hasDefiningRecipe() ||
+ VPDT.properlyDominates(Def->getDefiningRecipe()->getParent(),
+ Plan->getVectorPreheader());
----------------
Mel-Chen wrote:
Ping @fhahn
https://github.com/llvm/llvm-project/pull/117138
More information about the llvm-commits
mailing list