Here's another fix for a missing check that an IV value fits in a
HIW. It's originally from Stefan.
PR tree-optimization/117119
* tree-data-ref.cc (initialize_matrix_A): Check whether
an INTEGER_CST fits in HWI, otherwise return chrec_dont_know.
* gcc.dg/torture/pr117119.c: New testcase.
Co-Authored-By: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target int128 } */
+
+unsigned __int128 g_728;
+int func_1_l_5011[8];
+void func_1() {
+ for (;; g_728 += 1)
+ func_1_l_5011[g_728] ^= func_1_l_5011[g_728 + 5];
+}
+void main() {}
}
case INTEGER_CST:
- return chrec;
+ return cst_and_fits_in_hwi (chrec) ? chrec : chrec_dont_know;
default:
gcc_unreachable ();