https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103361
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d2f4753d4ff0edf944281cc2e4d5b5b91a9f14c9 commit r11-9583-gd2f4753d4ff0edf944281cc2e4d5b5b91a9f14c9 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)