This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR tree-optimize/45085 (-fpartial-inlining miscompile)


On Thu, Aug 26, 2010 at 7:17 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Aug 7, 2010 at 11:48 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 3, 2010 at 6:28 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>> hi,
>>> in the testcase we decide to split part of fn9 and by mistake we overwrite earlier computed
>>> return value. ?The actual bug is that visit_bb still expect single statement return bb while
>>> later I allowed return bb to contain move and return.
>>>
>>> However as observed by jakub, it does not make sense to always require the split part to compute
>>> return value. In some cases return value is already known from header but still we can split out
>>> some code. ?In fact I already handle case of constant returns, this patch makes the support
>>> generic and allow the return value to be computed either by header or split part.
>>> When it is computed by header, the split part gets empty return statement.
>>>
>>> Bootstrapped/regtested x86_64-linux, also tested on Mozilla build.
>>>
>>> OK?
>>> Honza
>>> ? ? ? ?* gcc.c-torture/compile/pr45085.c: New testcase.
>>> ? ? ? ?* ipa-split.c (struct split_point): Add split_part_set_retval.
>>> ? ? ? ?(find_retval): Forward declare.
>>> ? ? ? ?(test_nonssa_use, mark_nonssa_use): Special case return by reference.
>>> ? ? ? ?(consider_split): Compute current->split_part_set_retval.
>>> ? ? ? ?(visit_bb): Do not look into return value.
>>> ? ? ? ?(split_function): Handle !split_part_set_retval
>>
>> This caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45219
>>
>>
>
> This also caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412
>

This also caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46240


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]