mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-28 13:34:59 +08:00
Use POINTER_PLUS_EXPR for pointer types.
2010-04-04 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/43519 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use POINTER_PLUS_EXPR for pointer types. * gcc.dg/graphite/id-19.c: New. From-SVN: r158027
This commit is contained in:
parent
bd32f344ed
commit
dbe0d65216
@ -1,3 +1,11 @@
|
||||
2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR middle-end/43519
|
||||
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
|
||||
POINTER_PLUS_EXPR for pointer types.
|
||||
|
||||
* gcc.dg/graphite/id-19.c: New.
|
||||
|
||||
2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR middle-end/43519
|
||||
|
@ -1035,7 +1035,8 @@ graphite_create_new_loop_guard (sese region, edge entry_edge,
|
||||
one = gmp_cst_to_tree (type, gmp_one);
|
||||
value_clear (gmp_one);
|
||||
|
||||
ub = fold_build2 (PLUS_EXPR, type, ub, one);
|
||||
ub = fold_build2 (POINTER_TYPE_P (type) ? POINTER_PLUS_EXPR : PLUS_EXPR,
|
||||
type, ub, one);
|
||||
cond_expr = fold_build2 (LT_EXPR, boolean_type_node, lb, ub);
|
||||
|
||||
exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr);
|
||||
|
6
gcc/testsuite/gcc.dg/graphite/id-19.c
Normal file
6
gcc/testsuite/gcc.dg/graphite/id-19.c
Normal file
@ -0,0 +1,6 @@
|
||||
void byte_insert_op1 (unsigned char *loc, unsigned char *end)
|
||||
{
|
||||
register unsigned char *pto = end + 1 + 2;
|
||||
while (end != loc)
|
||||
*--pto = *--end;
|
||||
}
|
Loading…
Reference in New Issue
Block a user