More is_a <scalar_int_mode>
commitf6d4e346a11fd353b571a925e362747dddb617bf
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 13:33:18 +0000 (1 13:33 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 13:33:18 +0000 (1 13:33 +0000)
treeda0bcaa1c94b726da065df4b322e2369ee72ddfe
parent0d97e6d1fd7ca63c5b9aba845c4bb2bb7e508b93
More is_a <scalar_int_mode>

alias.c:find_base_term and find_base_value checked:

      if (GET_MODE_SIZE (GET_MODE (src)) < GET_MODE_SIZE (Pmode))

but (a) comparing the precision seems more correct, since it's possible
for modes to have the same memory size as Pmode but fewer bits and
(b) the functions are called on arbitrary rtl, so there's no guarantee
that we're handling an integer truncation.

Since there's no point processing truncations of anything other than an
integer, this patch checks that first.

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

gcc/
* alias.c (find_base_value, find_base_term): Only process integer
truncations.  Check the precision rather than the size.

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