Re: [PATCH] combine: Query can_change_dest_mode before changing dest mode

2016-11-24 Thread Segher Boessenkool
On Thu, Nov 24, 2016 at 11:04:13AM +0100, Georg-Johann Lay wrote: > >@@ -11287,7 +11287,8 @@ change_zero_ext (rtx pat) > > else if (GET_CODE (x) == ZERO_EXTEND > >&& SCALAR_INT_MODE_P (mode) > >&& REG_P (XEXP (x, 0)) > >- && HARD_REGISTER_P (XEXP (x, 0))) > >

Re: [PATCH] combine: Query can_change_dest_mode before changing dest mode

2016-11-24 Thread Georg-Johann Lay
On 24.11.2016 00:27, Segher Boessenkool wrote: As reported in https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02388.html . Changing the mode of a hard register can lead to problems, or at least it can make worse code if the result will need reloads. Tested on avr-elf on the test in that email, an

[PATCH] combine: Query can_change_dest_mode before changing dest mode

2016-11-23 Thread Segher Boessenkool
As reported in https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02388.html . Changing the mode of a hard register can lead to problems, or at least it can make worse code if the result will need reloads. Tested on avr-elf on the test in that email, and bootstrapped and regression checked on powerpc6