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.
/* { 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};
/* { 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};