diff options
author | Richard Biener <rguenther@suse.de> | 2022-12-19 14:55:45 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-12-19 16:36:21 +0100 |
commit | ec459469f8a75d96a9b26694554efcc900d411de (patch) | |
tree | 012e28e3a94af892efd782c0002d0dc892507454 /gcc/gimple-array-bounds.cc | |
parent | aa510619f8b650322c113d8593dd57afe6c6f9ae (diff) | |
download | gcc-ec459469f8a75d96a9b26694554efcc900d411de.zip gcc-ec459469f8a75d96a9b26694554efcc900d411de.tar.gz gcc-ec459469f8a75d96a9b26694554efcc900d411de.tar.bz2 |
tree-optimization/108164 - undefined overflow with IV vectorization
vect_update_ivs_after_vectorizer can end up emitting a signed
IV update when the loop body performed an unsigned computation.
The following makes sure to perform that update in the type
of the loop update type to avoid undefined behavior on overflow.
PR tree-optimization/108164
* tree-vect-loop-manip.cc (vect_update_ivs_after_vectorizer):
Perform vect_step_op_add update in the appropriate type.
* gcc.dg/pr108164.c: New testcase.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions