This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/87843] [9 Regression] SPEC miscompilation of 403.gcc and 502.gcc_r benchmarks


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87843

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 44946
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44946&action=edit
reproducer

I am attaching the preprocessed file and will be away till 2pm.
What seems to be wrong is that we optimize out decrease of n_useless_values in
discard_useless_locs.
fre1 already differs:

 discard_useless_locs (void * * x, void * info)
 {
   struct elt_loc_list * l;
@@ -8886,9 +8895,6 @@
   struct rtx_def * _4;
   int _5;
   struct elt_loc_list * _7;
-  struct elt_loc_list * _8;
-  int n_useless_values.142_9;
-  int _10;
   struct elt_loc_list * _25;
   struct elt_loc_list * empty_elt_loc_lists.98_26;

@@ -8947,27 +8953,6 @@

   <bb 7> :
   # DEBUG BEGIN_STMT
-  if (_1 != 0B)
-    goto <bb 8>; [INV]
-  else
-    goto <bb 10>; [INV]
-
-  <bb 8> :
-  _8 = v_16->locs;
-  if (_8 == 0B)
-    goto <bb 9>; [INV]
-  else
-    goto <bb 10>; [INV]
-
-  <bb 9> :
-  # DEBUG BEGIN_STMT
-  n_useless_values.142_9 = n_useless_values;
-  _10 = n_useless_values.142_9 + 1;
-  n_useless_values = _10;
-  # DEBUG BEGIN_STMT
-  values_became_useless = 1;
-
-  <bb 10> :
   # DEBUG BEGIN_STMT

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]