This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Compare-elim pass (was: Re: [PATCH] Fix PR 61225)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jeff Law <law at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Zhenqiang Chen <zhenqiang dot chen at linaro dot org>, Richard Henderson <rth at redhat dot com>
- Date: Fri, 05 Dec 2014 18:15:54 +0100
- Subject: Re: Compare-elim pass (was: Re: [PATCH] Fix PR 61225)
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4YmXQncYbPa+6-zjNqCEdRam8Lc5S3GB5YNbksPeonvXg at mail dot gmail dot com>
> --quote--
> If we want to use this pass for x86, then for 4.8 we should also fix the
> discrepancy between the compare-elim canonical
>
> [(operate)
> (set-cc)]
>
> and the combine canonical
>
> [(set-cc)
> (operate)]
>
> (Because of the simplicity of the substitution in compare-elim, I prefer
> the former as the canonical canonical.)
> --/quote--
I agree with the above.
> There were some patches flowing around [2], [3] that enhanced
> compare-elim pass for x86 needs, but the target never switched to new
> pass, mostly because compare-elim pass did not catch all cases that
> traditional RTX combine pass did.
Does [2] really work with the mode mismatch? See the pending patch at
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03458.html
> Due to the above, I would like to propose that existing RTX compare
> pass be updated to handle [(operate)(set-cc)] patterns (exclusively?).
That's already what it does though, did you mean the opposite? Or did you
mean to write "combine" instead of "compare"?
> There is also hidden benefit for "other", compare-elim only targets.
> Having this pass enabled on a wildly popular target would help
> catching eventual bugs in the pass.
FWIW we're about to submit a port that makes a heavy use of it.
--
Eric Botcazou