https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117123
--- Comment #10 from Filip Kastl <pheeck at gcc dot gnu.org> ---
I've looked at the pre-details dumps for runs with and without sccopy1 (I'm
compiling the reduced testcase with -Os). Even when I adjust for different SSA
name versions, there are many differences in the dumps. The ANTIC_IN and
ANTIC_OUT sets certainly differ between the two runs. The first ANTIC_IN set
that is different is ANTIC_IN[8]
without sccopy1:
[changed] ANTIC_IN[8] := { _2 (0002), spud_0_6 (0001), {gt_expr,spud_0_6,1000}
(0010) }
with sccopy1:
[changed] ANTIC_IN[8] := { _18 (0013), spud_0_5 (0003), {gt_expr,spud_0_5,1000}
(0014), {bit_and_expr,_18,_19} (0012) }
SSA name version 2 maps to 18 and 6 maps to 5 so that's ok. But in the run
with sccopy1 there is an extra element -- the expression _18 & _19. As I've
noted, the GIMPLE code before pre is the same in both runs up to reordering
blocks and edges. However, pre produces a different ANTIC_IN.
Should I rename the report to something like "PRE gets confused by edge order
and fails to optimize out code at -Os"?
Btw, if this is sufficient evidence that this is a bug in pre and if that's ok,
I'll unassign myself from this bug.