Fix mode_for_size units in caller-save.c (PR83761)
commitc6d32064fcb38b290cf734da1a997000de0389e4
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 09:54:26 +0000 (11 09:54 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 09:54:26 +0000 (11 09:54 +0000)
treefdf45f7f4b6748489423ba58b083abd8a70b75a9
parent0d4309c04553f73891dd09c77ac0c4331386d7ef
Fix mode_for_size units in caller-save.c (PR83761)

The new opt_mode asserts triggered for replace_reg_with_saved_mem
because it was passing bytes rather than bits to mode_for_size.
Previously we ended up with a BLKmode register instead, but
presumably that didn't matter because this is "only" used for
debug insns.

2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR rtl-optimization/83761
* caller-save.c (replace_reg_with_saved_mem): Pass bits rather
than bytes to mode_for_size.

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