[llvm] [LV][NFC] Remove undef from phi incoming values (PR #163762)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 02:02:52 PDT 2025


================
@@ -34,8 +34,8 @@ for.body:                                         ; preds = %for.body.lr.ph, %fo
   br i1 %cmp, label %for.body, label %for.end
 
 for.end:                                          ; preds = %for.body, %entry
-  %c.0.lcssa = phi i16 [ undef, %entry ], [ %c.0., %for.body ]
-  %d.0.lcssa = phi i16 [ undef, %entry ], [ %.sink28, %for.body ]
+  %c.0.lcssa = phi i16 [ 0, %entry ], [ %c.0., %for.body ]
----------------
fhahn wrote:

we could remove the phi node alltogether, by removing the unneeded check in the entry block

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


More information about the llvm-commits mailing list