[llvm] [LV] Limits the splat operations be hoisted must not be defined by a recipe. (PR #117138)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 03:25:36 PST 2024


================
@@ -267,7 +271,11 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
     return Data.VPV2Vector[Def];
 
   auto GetBroadcastInstrs = [this, Def](Value *V) {
-    bool SafeToHoist = Def->isDefinedOutsideLoopRegions();
+    bool SafeToHoist =
----------------
fhahn wrote:

`licm` only operates on the loop region, so we should not visit recipes in the middle block (or successors of it) and using `isDefinedOutsideLoopRegions` should be sufficient?

https://github.com/llvm/llvm-project/pull/117138


More information about the llvm-commits mailing list