Prevent invalid register mode changes in combine
commit4f0eb67f3a453244ec1cdcc764ba2163fe31d2bd
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 08:54:22 +0000 (1 08:54 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 08:54:22 +0000 (1 08:54 +0000)
tree15cc0b6bcadb90da797eecab3ad626c487496ade
parent20390c01ce84cbeabcf6929812c7c9e828925a78
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-11-01  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@254291 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c