This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/68590] FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check"


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The regression is that for:

(gdb) p debug_generic_expr(rci->high_bound)
(integer) ((struct loop_optimization19__obj_t *) s1)->length

(gdb) p debug_generic_expr(gnu_high)
(integer) ((struct loop_optimization19__obj_t *) s1)->length

calling fold_binary (LE_EXPR, boolean_type_node, op0 , op1) yields:

(gdb) p debug_generic_expr(high_ok)
SAVE_EXPR <(integer) ((struct loop_optimization19__obj_t *) s1)->length>;, 1

instead of just 1 before, which is really annoying because SAVE_EXPR has
TREE_SIDE_EFFECTS set on it so the whole COMPOUND_EXPR has it too.

Can't we be move clever here and avoid pessimizing folding in this case?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]