This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [gcc, combine] PR46164: Don't combine the insns if a volatile register is contained.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]