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: Fix PR rtl-optimization/58295


On 09/12/13 23:18, Eric Botcazou wrote:
It's the pessimization introduced on the ARM (and other RISC targets) by the
distribution of truncations in simplify_truncation.  Further information at:
   http://gcc.gnu.org/ml/gcc/2013-12/msg00019.html

The change started as a simple address reassociation trick for x32 and evolved
into a general distribution of truncations for common operations.  But the
outcome doesn't really play nice with other transformations that help on RISC
targets so I think that we should restrict it.  I'm not sure whether it really
helps on CISC targets either, but it's at least neutral and it's too late to
backpedal anyway since further changes were installed in the x86 back-end.

Hence the proposed minimal patch based on WORD_REGISTER_OPERATIONS.  Not clear
whether it's the best long term solution, but I think that we want to fix the
regression on the 4.8 branch as well.

Tested on x86-64/Linux, PowerPC/Linux and IA-64/Linux.  As reported by Kyrill,
this fixes gcc.target/arm/unsigned-extend-1.c on the ARM.

Comments?

Hi Eric,

The patch does indeed fix unsigned-extend-1.c on arm and bootstraps succesfully on arm-none-linux-gnueabihf.

Thanks for fixing this, that test failure has been spoiling my test runs for quite a while now :)

Kyrill



2013-12-09  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/58295
	* simplify-rtx.c (simplify_truncation): Restrict the distribution for
	WORD_REGISTER_OPERATIONS targets.





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