[58/77] Use scalar_int_mode in a try_combine optimisation
commit5e2799ea8ac58bb39840a49a28b702c23efd2334
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:18:29 +0000 (30 11:18 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:18:29 +0000 (30 11:18 +0000)
tree97a0311ec16d63c69c73d255611afe6da1970e0e
parentfa8ce0e15e7bdbbf3774bb0a8d569685efdab221
[58/77] Use scalar_int_mode in a try_combine optimisation

This patch uses scalar_int_modes for:

  /* If I2 is setting a pseudo to a constant and I3 is setting some
     sub-part of it to another constant, merge them by making a new
     constant.  */

This was already implicit, but the danger with checking only
CONST_SCALAR_INT_P is that it can include CC values too.

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

gcc/
* combine.c (try_combine): Use is_a <scalar_int_mode> when
trying to combine a full-register integer set with a subreg
integer set.

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