This is the mail archive of the 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 Tue, Aug 3, 2010 at 6:28 AM, Jan Hubicka <> 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:


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