This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [gcc, combine] PR46164: Don't combine the insns if a volatile register is contained.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Hale Wang <hale dot wang at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Jan 2015 11:11:21 +0100
- Subject: Re: [PATCH] [gcc, combine] PR46164: Don't combine the insns if a volatile register is contained.
- Authentication-results: sourceware.org; auth=none
- References: <001e01d0394e$470bc390$d5234ab0$ at arm dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jan 26, 2015 at 05:55:52PM +0800, Hale Wang wrote:
> The GCC combine pass combines the insns even though they contain volatile
> registers. This doesn't make sence.
>
> The test case listed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46164
> shows the expected asm command "mov r1, r1" is not generated."r1" is defined
> as a volatile register, and there are three insns related to r1:
There is nothing volatile on reg/v, that is just a flag that the
corresponding variable has been declared by the user. Preventing that to be
combined would be a serious regression on code quality.
Jakub