This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix gcc.dg/tree-ssa/operand-equal-2.c testcase
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Oct 2015 14:55:43 +0100 (CET)
- Subject: [PATCH] Fix gcc.dg/tree-ssa/operand-equal-2.c testcase
- Authentication-results: sourceware.org; auth=none
forwprop1 cannot handle it (it requires to CSE the two vector initializers
first). fre1 can do that but due to an oversight in gimple_simplify
it didn't.
Fixed thus.
Bootstrap / regtest running on x86_64-unknown-linux-gnu.
Richard.
2015-10-28 Richard Biener <rguenther@suse.de>
* gimple-match-head.c (gimple_simplify): Allow VECTOR_CSTs
in simplifying VEC_COND_EXPR conditions.
* gcc.dg/tree-ssa/operand-equal-2.c: Adjust.
Index: gcc/gimple-match-head.c
===================================================================
--- gcc/gimple-match-head.c (revision 229484)
+++ gcc/gimple-match-head.c (working copy)
@@ -708,7 +708,8 @@ gimple_simplify (gimple *stmt,
rhs1 = build2 (rcode2, TREE_TYPE (rhs1),
ops2[0], ops2[1]);
else if (rcode2 == SSA_NAME
- || rcode2 == INTEGER_CST)
+ || rcode2 == INTEGER_CST
+ || rcode2 == VECTOR_CST)
rhs1 = ops2[0];
else
valueized = false;
Index: gcc/testsuite/gcc.dg/tree-ssa/operand-equal-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/operand-equal-2.c (revision 229484)
+++ gcc/testsuite/gcc.dg/tree-ssa/operand-equal-2.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-forwprop1" } */
+/* { dg-options "-O -fdump-tree-fre1" } */
typedef char __attribute__ ((vector_size (4))) v4qi;
@@ -9,4 +9,4 @@ void ret(char a)
v4qi c={a,a,a,a},d={a,a,a,a};
v = (c!=d);
}
-/* { dg-final { scan-tree-dump "v = . 0, 0, 0, 0 ." "forwprop2"} } */
+/* { dg-final { scan-tree-dump "v = . 0, 0, 0, 0 ." "fre1"} } */