public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR ipa/68311
@ 2015-11-13 12:04 Martin Liška
  2015-11-13 12:17 ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Liška @ 2015-11-13 12:04 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

Hello.

Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.

Ready for trunk?
Thanks,
Martin

[-- Attachment #2: 0001-Fix-PR-ipa-68311.patch --]
[-- Type: text/x-patch, Size: 1105 bytes --]

From bc07c0709f0601e18b7ea7dfad867a5296378640 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Thu, 12 Nov 2015 16:17:52 +0100
Subject: [PATCH] Fix PR ipa/68311

gcc/ChangeLog:

2015-11-12  Martin Liska  <mliska@suse.cz>

	PR ipa/68311
	* ipa-icf.c (sem_item_optimizer::traverse_congruence_split):
	Replace ctor with auto_vec and initialization in a loop.
---
 gcc/ipa-icf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 7bb3af5..97702c9 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -3038,7 +3038,9 @@ sem_item_optimizer::traverse_congruence_split (congruence_class * const &cls,
 
   if (popcount > 0 && popcount < cls->members.length ())
     {
-      congruence_class* newclasses[2] = { new congruence_class (class_id++), new congruence_class (class_id++) };
+      auto_vec <congruence_class *> newclasses (2);
+      newclasses.safe_push (new congruence_class (class_id++));
+      newclasses.safe_push (new congruence_class (class_id++));
 
       for (unsigned int i = 0; i < cls->members.length (); i++)
 	{
-- 
2.6.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix PR ipa/68311
  2015-11-13 12:04 [PATCH] Fix PR ipa/68311 Martin Liška
@ 2015-11-13 12:17 ` Richard Biener
  2015-11-14  8:33   ` Christophe Lyon
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2015-11-13 12:17 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Fri, Nov 13, 2015 at 1:04 PM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.
>
> Ready for trunk?

Please use

 auto_vec <congruence_class *, 2> newclasses;

as it gets you a stack allocation.  Also use quick_push as you know the vector
is large enough.

Ok with that changes.

Richard.

> Thanks,
> Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix PR ipa/68311
  2015-11-13 12:17 ` Richard Biener
@ 2015-11-14  8:33   ` Christophe Lyon
  2015-11-15  9:01     ` Martin Liška
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe Lyon @ 2015-11-14  8:33 UTC (permalink / raw)
  To: Richard Biener; +Cc: Martin Liška, GCC Patches

On 13 November 2015 at 13:17, Richard Biener <richard.guenther@gmail.com> wrote:
> On Fri, Nov 13, 2015 at 1:04 PM, Martin Liška <mliska@suse.cz> wrote:
>> Hello.
>>
>> Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.
>>
>> Ready for trunk?
>
> Please use
>
>  auto_vec <congruence_class *, 2> newclasses;
>
> as it gets you a stack allocation.  Also use quick_push as you know the vector
> is large enough.
>
> Ok with that changes.
>
> Richard.
>
Hi,

This patch broke the GCC build for armeb in libgfortran:
/tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:
In function 'matmul_i4':
/tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:79:1:
internal compiler error: in vectorizable_load, at tree-vect-s
tmts.c:6711
 matmul_i4 (gfc_array_i4 * const restrict retarray,
 ^

0xcff5d2 vectorizable_load
        /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:6711
0xd06955 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*,
_slp_tree*, _slp_instance*)
        /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:8002
0xd0ec21 vect_transform_loop(_loop_vec_info*)
        /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-loop.c:6793
0xd317c9 vectorize_loops()
        /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vectorizer.c:533
Please submit a full bug report,



>> Thanks,
>> Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix PR ipa/68311
  2015-11-14  8:33   ` Christophe Lyon
@ 2015-11-15  9:01     ` Martin Liška
  2015-11-15 21:27       ` Christophe Lyon
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Liška @ 2015-11-15  9:01 UTC (permalink / raw)
  To: gcc-patches

On 11/14/2015 09:33 AM, Christophe Lyon wrote:
> On 13 November 2015 at 13:17, Richard Biener <richard.guenther@gmail.com> wrote:
>> On Fri, Nov 13, 2015 at 1:04 PM, Martin Liška <mliska@suse.cz> wrote:
>>> Hello.
>>>
>>> Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.
>>>
>>> Ready for trunk?
>>
>> Please use
>>
>>  auto_vec <congruence_class *, 2> newclasses;
>>
>> as it gets you a stack allocation.  Also use quick_push as you know the vector
>> is large enough.
>>
>> Ok with that changes.
>>
>> Richard.
>>
> Hi,
> 
> This patch broke the GCC build for armeb in libgfortran:
> /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:
> In function 'matmul_i4':
> /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:79:1:
> internal compiler error: in vectorizable_load, at tree-vect-s
> tmts.c:6711
>  matmul_i4 (gfc_array_i4 * const restrict retarray,
>  ^
> 
> 0xcff5d2 vectorizable_load
>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:6711
> 0xd06955 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*,
> _slp_tree*, _slp_instance*)
>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:8002
> 0xd0ec21 vect_transform_loop(_loop_vec_info*)
>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-loop.c:6793
> 0xd317c9 vectorize_loops()
>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vectorizer.c:533
> Please submit a full bug report,

Hi Christophe.

It looks really strange that the ICE is caused by the patch. May I ask you for creating a PR
and attaching pre-processed source file, so that I can reproduce it with cross-compiler?

Thank you,
Martin

> 
> 
> 
>>> Thanks,
>>> Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix PR ipa/68311
  2015-11-15  9:01     ` Martin Liška
@ 2015-11-15 21:27       ` Christophe Lyon
  0 siblings, 0 replies; 5+ messages in thread
From: Christophe Lyon @ 2015-11-15 21:27 UTC (permalink / raw)
  To: Martin Liška; +Cc: gcc-patches

On 15 November 2015 at 10:01, Martin Liška <mliska@suse.cz> wrote:
> On 11/14/2015 09:33 AM, Christophe Lyon wrote:
>> On 13 November 2015 at 13:17, Richard Biener <richard.guenther@gmail.com> wrote:
>>> On Fri, Nov 13, 2015 at 1:04 PM, Martin Liška <mliska@suse.cz> wrote:
>>>> Hello.
>>>>
>>>> Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.
>>>>
>>>> Ready for trunk?
>>>
>>> Please use
>>>
>>>  auto_vec <congruence_class *, 2> newclasses;
>>>
>>> as it gets you a stack allocation.  Also use quick_push as you know the vector
>>> is large enough.
>>>
>>> Ok with that changes.
>>>
>>> Richard.
>>>
>> Hi,
>>
>> This patch broke the GCC build for armeb in libgfortran:
>> /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:
>> In function 'matmul_i4':
>> /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgfortran/generated/matmul_i4.c:79:1:
>> internal compiler error: in vectorizable_load, at tree-vect-s
>> tmts.c:6711
>>  matmul_i4 (gfc_array_i4 * const restrict retarray,
>>  ^
>>
>> 0xcff5d2 vectorizable_load
>>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:6711
>> 0xd06955 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*,
>> _slp_tree*, _slp_instance*)
>>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-stmts.c:8002
>> 0xd0ec21 vect_transform_loop(_loop_vec_info*)
>>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vect-loop.c:6793
>> 0xd317c9 vectorize_loops()
>>         /tmp/9046893_7.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vectorizer.c:533
>> Please submit a full bug report,
>
> Hi Christophe.
>
> It looks really strange that the ICE is caused by the patch. May I ask you for creating a PR
> and attaching pre-processed source file, so that I can reproduce it with cross-compiler?
>

Well, the build succeded before this commit and started to fail at
r230311 (this commit).

I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68367

Thanks

> Thank you,
> Martin
>
>>
>>
>>
>>>> Thanks,
>>>> Martin
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-15 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 12:04 [PATCH] Fix PR ipa/68311 Martin Liška
2015-11-13 12:17 ` Richard Biener
2015-11-14  8:33   ` Christophe Lyon
2015-11-15  9:01     ` Martin Liška
2015-11-15 21:27       ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).