aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-21 07:01:59 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-21 07:01:59 +0000
commitbc83d568345bb3d8210b73f038109a972e7f6f6d (patch)
tree0a33810678aef4b1d2c2f1f3e4903455956a9497 /gcc/tree-ssanames.c
parent1079d2c187d78c2d3a974c42c56bb274bbde9da8 (diff)
downloadgcc-bc83d568345bb3d8210b73f038109a972e7f6f6d.zip
gcc-bc83d568345bb3d8210b73f038109a972e7f6f6d.tar.gz
gcc-bc83d568345bb3d8210b73f038109a972e7f6f6d.tar.bz2
poly_int: adjust_ptr_info_misalignment
This patch makes adjust_ptr_info_misalignment take the adjustment as a poly_uint64 rather than an unsigned int. 2017-12-21 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * tree-ssanames.h (adjust_ptr_info_misalignment): Take the increment as a poly_uint64 rather than an unsigned int. * tree-ssanames.c (adjust_ptr_info_misalignment): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r255928
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index d00d648..2fe6e3f 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -643,13 +643,16 @@ set_ptr_info_alignment (struct ptr_info_def *pi, unsigned int align,
misalignment by INCREMENT modulo its current alignment. */
void
-adjust_ptr_info_misalignment (struct ptr_info_def *pi,
- unsigned int increment)
+adjust_ptr_info_misalignment (struct ptr_info_def *pi, poly_uint64 increment)
{
if (pi->align != 0)
{
- pi->misalign += increment;
- pi->misalign &= (pi->align - 1);
+ increment += pi->misalign;
+ if (!known_misalignment (increment, pi->align, &pi->misalign))
+ {
+ pi->align = known_alignment (increment);
+ pi->misalign = 0;
+ }
}
}