This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 61225
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Zhenqiang Chen <zhenqiang dot chen at arm dot com>
- Cc: "'Jeff Law'" <law at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 4 Dec 2014 14:49:56 -0600
- Subject: Re: [PATCH] Fix PR 61225
- Authentication-results: sourceware.org; auth=none
- References: <CACgzC7A7+JXBQ-HCcoqjhmbjoALCi8nngJy2J8SXHF1GRvyQPQ at mail dot gmail dot com> <CABu31nP5TqCU3iB-3jBTU93bORrCAmohq5nzcVBdjx2cqabrzA at mail dot gmail dot com> <CACgzC7D40=bxqag59GYQuXtze_ZAquo3PhpLmh0EGxZte5Mw4A at mail dot gmail dot com> <53C73EBD dot 9070909 at redhat dot com> <CACgzC7CJnoaOsFMDjXDZ0CLiECWPbejxDHg2GOk_AUtjrzC80w at mail dot gmail dot com> <547CE75B dot 6090709 at redhat dot com> <000001d00f9e$64f43600$2edca200$ at arm dot com>
On Thu, Dec 04, 2014 at 04:43:34PM +0800, Zhenqiang Chen wrote:
> C code:
>
> if (!--*p)
>
> rtl code:
>
> 6: r91:SI=[r90:SI]
> 7: {r88:SI=r91:SI-0x1;clobber flags:CC;}
> 8: [r90:SI]=r88:SI
> 9: flags:CCZ=cmp(r88:SI,0)
>
> expected output:
>
> 8: {flags:CCZ=cmp([r90:SI]-0x1,0);[r90:SI]=[r90:SI]-0x1;}
>
> in assemble, it is
>
> decl (%eax)
Combine does not consider combining 9 into 7 because there is no LOG_LINK
between them (the link for r88 is between 8 and 7 already).
Segher