This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Drop CONSTRUCTOR comparsion from ipa-icf-gimple
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Oct 2015 12:53:01 +0200
- Subject: Re: Drop CONSTRUCTOR comparsion from ipa-icf-gimple
- Authentication-results: sourceware.org; auth=none
- References: <20151016031234 dot GC45365 at kam dot mff dot cuni dot cz> <CAFiYyc1ZsKWyLzGWTBqRrtH4NOw6w6cs1AA1Oz_vACqAytmcbw at mail dot gmail dot com> <CAMe9rOrO_rU-QeJQgMpH3a8T7N6=2oNYfrpmPgHOVcYsT9-WcA at mail dot gmail dot com>
> On Fri, Oct 16, 2015 at 1:46 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:
> > On Fri, Oct 16, 2015 at 5:12 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> Hi,
> >> as Richard noticed in my port of the code to operand_equal_p, the checking of
> >> CONSTURCTOR in ipa-icf-gimple is incomplete missing the index checks.
> >> It is also unnecesary since non-empty ctors does not happen as gimple
> >> operands. This patch thus removes the unnecesary code.
> >
> > Err - they do happen, for vector constructors. Just empty constructors
> > are not allowed for vector constructors - vector constructors are required
> > to have elements in proper order and none left out.
> >
> > Sorry for misleading you.
> >
> >> Bootstrapped/regtested x86_64-linux, comitted.
> >
> > this will definitely ICE ...
> >
>
> And it did on x86:
>
> https://gcc.gnu.org/ml/gcc-regression/2015-10/msg00166.html
>
I am going to commit the following revert wich also adds generic testcase
as soon as testing converges.
Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog (revision 228865)
+++ testsuite/ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2015-10-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.c-torture/compile/icfmatch.c: Add testcase
+
2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67926
Index: testsuite/gcc.c-torture/compile/icfmatch.c
===================================================================
--- testsuite/gcc.c-torture/compile/icfmatch.c (revision 0)
+++ testsuite/gcc.c-torture/compile/icfmatch.c (revision 0)
@@ -0,0 +1,11 @@
+typedef char __attribute__ ((vector_size (4))) v4qi;
+void retv (int a,int b,int c,int d, v4qi *ret)
+{
+ v4qi v = { a, b , c, d };
+ *ret = v;
+}
+void retv2 (int a,int b,int c,int d, v4qi *ret)
+{
+ v4qi v = { a, b , c, d };
+ *ret = v;
+}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 228867)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2015-10-11 Jan Hubicka <hubicka@ucw.cz>
+
+ Revert:
+ * ipa-icf-gimple.c (func_checker::compare_operand): Compare only
+ empty constructors.
+
2015-10-16 Richard Biener <rguenther@suse.de>
* gimple-fold.c (gimple_fold_builtin_memory_op): Use gimple_build