Prevent invalid register mode changes in combine
commit0e87eeb6ed1c907703d16b8a21ab16eed7b0e2df
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Oct 2017 09:58:23 +0000 (13 09:58 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Oct 2017 09:58:23 +0000 (13 09:58 +0000)
tree00cfb30f3cf9eb032dc83d729b0f9afda961e1c7
parent332d11bd6d121221dc6fc28a8cd8b07af38c385b
Prevent invalid register mode changes in combine

This patch stops combine from changing the mode of an existing register
in-place if doing so would change the size of the underlying register
allocation size, as given by REGMODE_NATURAL_SIZE.  Without this,
many tests fail in adjust_reg_mode after SVE is added.  One example
is gcc.c-torture/compile/20090401-1.c.

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* combine.c (can_change_dest_mode): Reject changes in
REGMODE_NATURAL_SIZE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253717 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c