This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Add conditional compare support
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Zhenqiang Chen <zhenqiang dot chen at linaro dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 Aug 2013 21:16:42 +0000
- Subject: Re: [RFC] Add conditional compare support
- References: <CACgzC7CAQtOZ6QtjCZsS+KOtqCGLVvtAV1nSFTdVFfP1T==jdQ at mail dot gmail dot com>
On Wed, 21 Aug 2013, Zhenqiang Chen wrote:
> SHORT_CIRCUIT expression will be converted to CCMP expressions
> at the end of front-end.
That doesn't sound like the right place to me. We want the same code to
be generated whether users write && and || directly or write corresponding
sequences of if conditions. In general we want to move away from
optimizing complicated expressions in fold-const, towards having GIMPLE
passes that detect the relevant patterns however they were written (and
without needing to combine GIMPLE back into trees for passing through the
old folder). So, I think you should detect this at some point in the
GIMPLE optimizations rather than changing fold-const at all (and as a
consequence, you then shouldn't need to change front-end pretty-printers).
Joseph S. Myers