]> gcc.gnu.org Git - gcc.git/commitdiff
Before running fast VRP, make sure all edges have EXECUTABLE set.
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 6 Sep 2024 15:42:14 +0000 (11:42 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Sat, 7 Sep 2024 17:52:46 +0000 (13:52 -0400)
PR tree-optimization/116588
gcc/
* tree-vrp.cc (execute_fast_vrp): Start with all edges executable.
gcc/testsuite/
* gcc.dg/pr116588.c: New.

gcc/testsuite/gcc.dg/pr116588.c [new file with mode: 0644]
gcc/tree-vrp.cc

diff --git a/gcc/testsuite/gcc.dg/pr116588.c b/gcc/testsuite/gcc.dg/pr116588.c
new file mode 100644 (file)
index 0000000..677964d
--- /dev/null
@@ -0,0 +1,31 @@
+/* PR tree-optimization/116588 */
+/* { dg-do run { target bitint575 } } */
+/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0  -DDEBUG -fdump-tree-vrp2-details" } */
+
+int a;
+__int128 b, c;
+
+__int128
+foo (_BitInt (129) e)
+{
+  _BitInt (129) f = e << (128 - c);
+  __builtin_memset (&b, a, 4);
+  __int128 r = e + f;
+  return r;
+}
+
+int
+main ()
+{
+  __int128 x = foo (0);
+#ifdef DEBUG
+  for (unsigned i = 0; i < sizeof (x); i++)
+    __builtin_printf ("%02x", i[(volatile unsigned char *) &x]);
+  __builtin_printf("\n");
+#else
+  if (x)
+    __builtin_abort();
+#endif
+}
+
+/* { dg-final { scan-tree-dump-not "0 != 0" "vrp2" } } */
index 23946c57413734f789e403805ccfbb7589ea0cb4..a19f8ec242669881e673c027a7dda80accad89b9 100644 (file)
@@ -1258,6 +1258,7 @@ execute_fast_vrp (struct function *fun, bool final_p)
   fvrp_folder folder (&dr, final_p);
 
   gcc_checking_assert (!fun->x_range_query);
+  set_all_edges_as_executable (fun);
   fun->x_range_query = &dr;
   // Create a relation oracle without transitives.
   get_range_query (fun)->create_relation_oracle (false);
This page took 0.078446 seconds and 5 git commands to generate.