https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103361
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d55db847de865ec3a4d7a89c30295924508e1833 commit r9-10042-gd55db847de865ec3a4d7a89c30295924508e1833 Author: Richard Biener <rguent...@suse.de> Date: Tue Nov 23 10:11:41 2021 +0100 tree-optimization/103361 - fix unroll-and-jam direction vector handling This properly uses lambda_int instead of truncating the direction vector to int which leads to false unexpected negative values. 2021-11-23 Richard Biener <rguent...@suse.de> PR tree-optimization/103361 * gimple-loop-jam.c (adjust_unroll_factor): Use lambda_int for the dependence distance. * tree-data-ref.c (print_lambda_vector): Properly print a lambda_int. * g++.dg/torture/pr103361.C: New testcase. (cherry picked from commit 6cd440670078af89d82cbb67e01a5ecec8eec238)