combine: Query can_change_dest_mode before changing dest mode
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 23 Nov 2016 23:30:38 +0000 (00:30 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 23 Nov 2016 23:30:38 +0000 (00:30 +0100)
commit469585df2d22f325c50e1614d397a0a38b29df6f
tree4f7438022bdf1a4e4449696b64295c5916e59252
parent188a20911952c78871ddbfc645f5e4be8a711e06
combine: Query can_change_dest_mode before changing dest mode

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.

* combine.c (change_zero_ext): Only change the mode of a hard register
destination if can_change_dest_mode holds for that.

From-SVN: r242812
gcc/ChangeLog
gcc/combine.c