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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
The first difference appears in ifcombine where we "fail" to merge a few
blocks:

+optimizing two comparisons to _46 & _6
+optimizing two comparisons to _43 & _9
+optimizing two comparisons to _44 & _41
+optimizing two comparisons to _34 & _15
+Merging blocks 10 and 11
+Removing basic block 15
+;; basic block 15, loop depth 0
+;;  pred:      
+;;  succ:       16
+
+
+Merging blocks 22 and 23
+Merging blocks 25 and 14

ifcombine does

          tree t1, t2;
          bool logical_op_non_short_circuit = LOGICAL_OP_NON_SHORT_CIRCUIT;
          if (param_logical_op_non_short_circuit != -1)
            logical_op_non_short_circuit
              = param_logical_op_non_short_circuit;
          if (!logical_op_non_short_circuit || sanitize_coverage_p ())
            return false;

with the added default

#ifndef LOGICAL_OP_NON_SHORT_CIRCUIT
#define LOGICAL_OP_NON_SHORT_CIRCUIT \
  (BRANCH_COST (optimize_function_for_speed_p (cfun), \
                false) >= 2)
#endif    

neither i386 nor aarch64 define the macro, so both get it based on BRANCH_COST
which in this case depends on hot vs. cold.

This leads to downhill changes, the important function call to be removed
is still removed for both.

I'm going to XFAIL that part of the test.

Reply via email to