diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-11-16 10:20:23 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2016-11-16 10:20:23 +0000 |
commit | 0e0af68921530695ddfd86780a0d955674ef239f (patch) | |
tree | 528d4bf22f77e46d7341098e854448239ab851b1 /gcc | |
parent | 29220523c10fec10ba3f3de817257837611b4ec0 (diff) | |
download | gcc-0e0af68921530695ddfd86780a0d955674ef239f.zip gcc-0e0af68921530695ddfd86780a0d955674ef239f.tar.gz gcc-0e0af68921530695ddfd86780a0d955674ef239f.tar.bz2 |
Fix handling of unknown sizes in rtx_addr_can_trap_p
If the size passed in to rtx_addr_can_trap_p was zero, the frame
handling would get the size from the mode instead. However, this
too can be zero if the mode is BLKmode, i.e. if we have a BLKmode
memory reference with no MEM_SIZE (which should be rare these days).
This meant that the conditions for a 4-byte access at offset X were
stricter than those for an access of unknown size at offset X.
This patch checks whether the size is still zero, as the
SYMBOL_REF handling does.
gcc/
2016-11-15 Richard Sandiford <richard.sandiford@arm.com>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* rtlanal.c (rtx_addr_can_trap_p_1): Handle unknown sizes.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r242476
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/rtlanal.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db0f831..fe1d9c3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,12 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * rtlanal.c (rtx_addr_can_trap_p_1): Handle unknown sizes. + +2016-11-16 Richard Sandiford <richard.sandiford@arm.com> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * tree-vect-loop.c (vect_transform_loop): Protect the updates of all three iteration counts with an any_* test. Use a single update for each count. Fix the calculation of nb_iterations_estimate. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index ded337b..f07a77a 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -543,6 +543,8 @@ rtx_addr_can_trap_p_1 (const_rtx x, HOST_WIDE_INT offset, HOST_WIDE_INT size, if (size == 0) size = GET_MODE_SIZE (mode); + if (size == 0) + return 1; if (x == frame_pointer_rtx) { |