This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26944] [4.1/4.2 Regression] -ftree-ch generates worse code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2006 21:25:51 -0000
- Subject: [Bug tree-optimization/26944] [4.1/4.2 Regression] -ftree-ch generates worse code
- References: <bug-26944-1008@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-05-04 21:25 -------
(In reply to comment #8)
> WRT this code generated by tree-ch:
> D.1305_41 = Int_Loc_3 + 1;
> if (Int_Loc_3 <= D.1305_41) goto <L0>; else goto <L2>;
>
> AFAICT there's exactly one value for which the comparison can be false, IMO it
> would be better to test directly that value instead of generating a new SSA
> name and another expression.
Well CH should not do this as it never sees two expressions together, only the
one COND_EXPR. If we do a VRP after CH, it will not fix it currently either
because VRP does not record that many symbolic ranges (I forgot that PR number,
it was filed by me). If VRP did that and we added a VRP after CH but before
IV-OPTS, maybe this wil fix itself.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26944