diff options
author | Richard Biener <rguenther@suse.de> | 2025-04-18 14:52:41 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-04-18 16:13:24 +0200 |
commit | 1f7ac78efa622e19f38d6a45e857941b3dea1437 (patch) | |
tree | 46842671e5b8bcdf6fad0cbb1b5600d2c5d27716 | |
parent | 869f2ab30ad53033ad6ac82569d74ce3a99fe510 (diff) | |
download | gcc-1f7ac78efa622e19f38d6a45e857941b3dea1437.zip gcc-1f7ac78efa622e19f38d6a45e857941b3dea1437.tar.gz gcc-1f7ac78efa622e19f38d6a45e857941b3dea1437.tar.bz2 |
tree-optimization/119858 - type mismatch with POINTER_PLUS
The recent PFA early-break vectorization fix left us with a POINTER_PLUS
and non-sizetype offset.
PR tree-optimization/119858
* tree-vect-loop.cc (vectorizable_live_operation): Convert
pointer offset to sizetype.
-rw-r--r-- | gcc/tree-vect-loop.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 958b829..2d35fa1 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -11657,8 +11657,12 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info, break_lhs_phi); if (POINTER_TYPE_P (TREE_TYPE (new_tree))) - tmp2 = gimple_build (&iv_stmts, POINTER_PLUS_EXPR, - TREE_TYPE (new_tree), new_tree, tmp2); + { + tmp2 = gimple_convert (&iv_stmts, sizetype, tmp2); + tmp2 = gimple_build (&iv_stmts, POINTER_PLUS_EXPR, + TREE_TYPE (new_tree), new_tree, + tmp2); + } else { tmp2 = gimple_convert (&iv_stmts, TREE_TYPE (new_tree), |