On Thu, Aug 21, 2025 at 9:26 AM Andrew Pinski <andrew.pin...@oss.qualcomm.com> wrote: > > When working on PR121279, I noticed that lim > would create an uninitialized decl and marking > it with supression for uninitialization warning. > This is fine but then into ssa would just call > get_or_create_ssa_default_def on that new decl which > could in theory take some extra compile time to figure > that out. > Plus when doing the rewriting for undefinedness, there > would now be a VCE around the decl. This means the ssa > name is kept around and not propagated in some cases. > So instead this patch manually calls get_or_create_ssa_default_def > to get the "uninitalized" ssa name for this decl and > no longer needs the write into ssa nor for undefined ness. > > Bootstrapped and tested on x86_64-linux-gnu.
OK. Thanks, Richard. > gcc/ChangeLog: > > * tree-ssa-loop-im.cc (execute_sm): Call > get_or_create_ssa_default_def for the new uninitialized > decl. > > Signed-off-by: Andrew Pinski <andrew.pin...@oss.qualcomm.com> > --- > gcc/tree-ssa-loop-im.cc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc > index aee419aa5b1..0340857058b 100644 > --- a/gcc/tree-ssa-loop-im.cc > +++ b/gcc/tree-ssa-loop-im.cc > @@ -2355,6 +2355,7 @@ execute_sm (class loop *loop, im_mem_ref *ref, > loop entry as not to be warned for. */ > tree uninit = create_tmp_reg (TREE_TYPE (aux->tmp_var)); > suppress_warning (uninit, OPT_Wuninitialized); > + uninit = get_or_create_ssa_default_def (cfun, uninit); > load = gimple_build_assign (aux->tmp_var, uninit); > } > lim_data = init_lim_data (load); > -- > 2.43.0 >