From d33bc98f5bc65f2505fcaefb0f9055ec67fe36d2 Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Wed, 11 Nov 2020 21:18:23 -0600 Subject: [PATCH] testsuite: Adjust pr96789.c by disabling loop vect New test gcc.dg/tree-ssa/pr96789.c fails on arm-none-linux-gnueabihf since loop vectorizer is able to optimize the two loops which operate on array tmp with load_lanes feature support, it make dse3 fail to find expected inputs. As Richard suggested, this patch is to replace option -ftree-vectorize to -ftree-slp-vectorize -fno-tree-loop-vectorize. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr96789.c: Adjusted by disabling loop vectorization. --- gcc/testsuite/gcc.dg/tree-ssa/pr96789.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96789.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96789.c index d6139a014d8..5704952309b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr96789.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96789.c @@ -1,5 +1,8 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -funroll-loops -ftree-vectorize -fdump-tree-dse-details" } */ +/* Disable loop vectorization to avoid that loop vectorizer + optimizes those two loops that operate tmp array so that + subsequent dse3 won't eliminate expected tmp stores. */ +/* { dg-options "-O2 -funroll-loops -ftree-slp-vectorize -fno-tree-loop-vectorize -fdump-tree-dse-details" } */ /* Test if scalar cleanup pass takes effects, mainly check its secondary pass DSE can remove dead stores on array -- 2.30.2