This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping: [PATCH] Prevent crash when expand movstr fail when movstr pattern is defined
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Kito Cheng <kito at 0xlab dot org>, sandra at codesourcery dot com, aoliva at redhat dot com, gcc-patches at gcc dot gnu dot org, Chung-Ju Wu <jasonwucj at gmail dot com>
- Date: Sun, 19 Jan 2014 17:37:10 +0000
- Subject: Re: Ping: [PATCH] Prevent crash when expand movstr fail when movstr pattern is defined
- Authentication-results: sourceware.org; auth=none
- References: <CA+yXCZDhJBuxcWHGr+TbYz-Py1YUgXq=WiZutJZLXqzh09Nduw at mail dot gmail dot com> <CA+yXCZB=HQxQFcwGKTJOL1KaPDFuHsQjJHxnO8ezDzhzw2tLMw at mail dot gmail dot com> <87mwitmv8h dot fsf_-_ at talisman dot default> <20140118104415 dot GQ892 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
> On Sat, Jan 18, 2014 at 10:37:18AM +0000, Richard Sandiford wrote:
>> Review ping for this patch. IMO it almost counts as obviously correct
>> but just in case...
>>
>> Kito Cheng <kito@0xlab.org> writes:
>> > expand_movstr is work fine when we don't define movstr pattern or
>> > always expand it successfully, however it's will crash when if movstr
>> > expand fail since expand_insn expect always expand successfully (it's
>> > place a gcc_unreachable() when expand fail).
>> >
>> > this patch use maybe_expand_insn instead of expand_insn, check it done
>> > or not and just return NULL_RTX for generate a libcall if fail to
>> > expand movstr.
>> >
>> > 2014-01-11 Kito Cheng <kito@0xlab.org>
>> >
>> > * gcc/builtins.c (expand_movstr): Check movstr expand done or fail.
>
> Ok.
Thanks. It doesn't look like Kito has commit access so I went ahead
and applied it.
Kito, thanks for the patch.
Richard