This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/n] Add conditional compare support
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: Zhenqiang Chen <Zhenqiang dot Chen at arm dot com>, "'Richard Biener'" <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Oct 2013 10:02:58 -0700
- Subject: Re: [PATCH 1/n] Add conditional compare support
- Authentication-results: sourceware.org; auth=none
- References: <000001ce9e58$6dadf230$4909d690$ at arm dot com> <CAFiYyc25hLxrAnsOXbfqYo=Rsw_MDopxb66bygfac-CEsffOEw at mail dot gmail dot com> <521C9406 dot 6050901 at arm dot com> <CAFiYyc0zrBBUvRF0Vmv5PyvypfK75QYuc3D9AMTE+Fkh3nCq4Q at mail dot gmail dot com> <000001ceb453$ceaea3c0$6c0beb40$ at arm dot com> <523AC006 dot 5030706 at arm dot com> <000101ceb829$31ec9040$95c5b0c0$ at arm dot com> <000101cecf0b$148b33a0$3da19ae0$ at arm dot com> <5267F5DE dot 3050109 at redhat dot com> <000001ced090$98563e60$c902bb20$ at arm dot com> <526947BE dot 7080204 at redhat dot com> <526949C9 dot 5010105 at arm dot com> <52694A2D dot 5080800 at redhat dot com> <52694CAF dot 6010307 at arm dot com>
On 10/24/2013 09:37 AM, Richard Earnshaw wrote:
> It still needs to put out the right final condition based on the
> comparisons that were previously done. At least traditionaly (in the
> existing ARM code) the comparison was just EQ or NE even if the original
> tests were inequalities; so the only way to convey the real comparison
> information was through the condition code (where select_cc_mode could
> work out what was really needed).
> I guess if the branch had more information about the comparison, then
> the need to encode information through CC mode; but it's always been the
> case that the CC mode can modify the final branch condition needed in
> the instruction -- consider for example use of bpl vs bge for
> non-overflowing >= 0 tests.
Yes, the arm flags are not so dissimilar to i386 flags in that way.
In the i386 port, we do use the "real" comparison code plus a CCmode
in order to select between branches.
I missed the fact that these modes are pre-existing in the arm backend,
wrongly assuming that the ccmp patches were adding them. Thus all my
comments on the subject are spurious.