This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26899] New: Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1)
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2006 14:11:09 -0000
- Subject: [Bug middle-end/26899] New: Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Fold currently does not fold a lot of TRUTH_AND/OR_EXPRs created by
tree-ssa-loop-niter.c:tree_simplify_using_condition_1. Like for the testcase
int foo0(int i0, int i1)
{
int i, j = 0;
for (i=i0; i<=i1+1; ++i)
++j;
return j;
}
with PR26898 fixed. We there get
i0D.1520_4 > i1D.1521_6 + 1 || i1D.1521_6 < i0D.1520_4 - 1
(which is false) and
i0D.1520_4 <= i1D.1521_6 + 1 && i1D.1521_6 < i0D.1520_4 - 1
(which is also false and would make us figure out # iterations for the loop).
--
Summary: Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1)
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26899