]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/101467 - fix make_temp_ssa_name usage
authorRichard Biener <rguenther@suse.de>
Fri, 16 Jul 2021 09:17:37 +0000 (11:17 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 16 Jul 2021 10:01:46 +0000 (12:01 +0200)
My previous change to vect_gen_while introduced paths which call
make_temp_ssa_name with a NULL name which isn't supported.  The
following fixes that.

2021-07-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101467
* tree-vect-stmts.c (vect_gen_while): Properly guard
make_temp_ssa_name usage.

gcc/tree-vect-stmts.c

index ec82acb8db966ec2081aee4449f9c2b50799b838..0ef46962618b5ae8da6163593f023a6b49a4a454 100644 (file)
@@ -11999,7 +11999,11 @@ vect_gen_while (gimple_seq *seq, tree mask_type, tree start_index,
   gcall *call = gimple_build_call_internal (IFN_WHILE_ULT, 3,
                                            start_index, end_index,
                                            build_zero_cst (mask_type));
-  tree tmp = make_temp_ssa_name (mask_type, NULL, name);
+  tree tmp;
+  if (name)
+    tmp = make_temp_ssa_name (mask_type, NULL, name);
+  else
+    tmp = make_ssa_name (mask_type);
   gimple_call_set_lhs (call, tmp);
   gimple_seq_add_stmt (seq, call);
   return tmp;