This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/68590] FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check"
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Nov 2015 17:51:35 +0000
- Subject: [Bug ada/68590] FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check"
- Auto-submitted: auto-generated
- References: <bug-68590-4 at http dot gcc dot gnu dot org/bugzilla/>
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?