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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
I was able to track that to ltrans0, where one needs 2 optimizations to happen:
-fdbg-cnt=ipa_mod_ref_pta:1296-1296:1482-1482

then optimized dump differs (good vs. bad) in:

void recordScalar (struct cFileOutputScalarManager * const this, struct
cComponent * component, const char * name, double value, struct opp_string_map
* attributes)
{
...
   <bb 56> [local count: 84297948]:
   _152 = D.31174._M_dataplus._M_p;
-  if (&D.31174.D.4725._M_local_buf != _152)
-    goto <bb 57>; [53.47%]
-  else
-    goto <bb 58>; [46.53%]
-
-  <bb 57> [local count: 45074110]:
...
   _202 = D.31174._M_dataplus._M_p;
-  if (&D.31174.D.4725._M_local_buf != _202)
-    goto <bb 125>; [0.00%]
-  else
-    goto <bb 126>; [0.00%]
-
-  <bb 125> [count: 0]:
   _203 = D.31174.D.4725._M_allocated_capacity;
   _204 = _203 + 1;
   operator delete (_202, _204);

Reply via email to