]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR target/123269] Adjust predcomm testcases to avoid vectorization
authorJeff Law <jeffrey.law@oss.qualcomm.com>
Tue, 6 Jan 2026 23:16:56 +0000 (16:16 -0700)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Tue, 6 Jan 2026 23:18:59 +0000 (16:18 -0700)
Thankfully this "bug" is just a case where after Robin's change we're
vectorizing cases we weren't before which in turn doesn't give predcom the
opportunity to optimize the code.

Like on existing predcom test we can restore the test's intent by using
-fno-tree-vectorize.

Tested x86_64 and the various crosses to ensure nothing regressed.  Pushing to
the trunk.

PR target/123269

gcc/testsuite
* gcc.dg/tree-ssa/predcom-dse-4.c: Disable vectorization.
* gcc.dg/tree-ssa/predcom-dse-7.c: Likewise.

gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-4.c
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-7.c

index 0d64bc72f82341fd0518a6f59ad2a10aec7b0088..5fdd39c3f79940cf91736680ee2ef9194851a487 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -fno-inline -fno-tree-loop-distribute-patterns -fpredictive-commoning -fdump-tree-pcom-details-blocks" } */
+/* { dg-options "-O2 -fno-tree-vectorize -fno-inline -fno-tree-loop-distribute-patterns -fpredictive-commoning -fdump-tree-pcom-details-blocks" } */
 
 int arr[105] = {2, 3, 5, 7, 11};
 int result0[10] = {2, 3, 5, 7, 11};
index cfe44a06ce4ada6fddc3659ddf748a16904b5d9e..24c06d59d188901fa3ef49060dc21630e84158e4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -fno-inline -fpredictive-commoning -fdump-tree-pcom-details-blocks" } */
+/* { dg-options "-O2 -fno-tree-vectorize -fno-inline -fpredictive-commoning -fdump-tree-pcom-details-blocks" } */
 
 int arr[105] = {2, 3, 5, 7, 11, 13, 17, 19};
 int result0[10] = {2, 3, 5, 7, 11, 13, 17, 19};