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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I don't have an arm execution environment so maybe you can help me
reducing/analyzing this a bit.

The two places the optimization happens on are during PRE in foo1:

Visiting control stmt ending BB 34: if (v_23 != &v4)
Applying pattern match.pd:2408, gimple-match.c:1275
Marking all edges out of BB 34 but (34 -> 76) as not executable

and in foo2:

Visiting control stmt ending BB 34: if (v_23 != &v2)
Applying pattern match.pd:2408, gimple-match.c:1275
Marking all edges out of BB 34 but (34 -> 52) as not executable

v_23 is found to point to nothing in both cases (PRE re-runs PTA here).

Relevant constraints:

_154 = &NONLOCAL
_155 = _154 + UNKNOWN
_156 = _155
ap.0+64 = _156
_159 = ap.64+64
iftmp.35_161 = _159 + UNKNOWN
v_23 = *iftmp.35_161

There are no assigns to ap.64+64 (&ap at offset 64 bits, 64 bits size).

The issue is that

  <bb 2>:
  # USE = nonlocal escaped
  # CLB = nonlocal escaped { D.2770 } (escaped)
  __builtin_va_start (&ap, 0);

results in

ap.0+64 = &NONLOCAL
CALLCLOBBERED(15) = &ap.0+64

but fails to "clobber" all other fields.

Reply via email to