https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107704
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization,
||testsuite-fail
Ever confirmed|0 |1
Target Milestone|--- |13.0
Status|UNCONFIRMED |NEW
Last reconfirmed||2022-11-16
--- Comment #1 from Richard Biener ---
So the only change is
if (_11 == 0)
-goto ; [50.00%]
- else
goto ; [50.00%]
-;;succ: 6
-;;9
+ else
+goto ; [50.00%]
;; basic block 6, loop depth 0
;;pred: 5
goto ; [100.00%]
that's which edge has the forwarder. We are not good in preserving a
canonical form here and (repeated) CFG cleanup call yield either result
depending on which forwarder is removed first.
IIRC we've seen these kind of differences before.
An improvement here would be to enforce some processing order when
removing forwarders, like process EDGE_TRUE before EDGE_FALSE. But even
that will inevitably cause issues like this bug. A similar thing would
be enforcing that EDGE_TRUE is the first outgoing edge and EDGE_FALSE
the second. But then this is more about visitation order and this part
of CFG cleanup just walks over all blocks in block order.