This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR52528, combine fix
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "Chung-Lin Tang" <cltang at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 10 Mar 2012 09:30:49 +0100
- Subject: Re: [PATCH] PR52528, combine fix
- References: <4F5B0C9F.3010001@codesourcery.com>
> So the fix is a one-liner that sets subst_low_luid before the
> expand_field_assignment() call. Bootstrapped and tested under i686,
> x86-64, powerpc64. Cross-tested on ARM. I was a bit weary that some
> optimization regression might appear, which will complicate things, but
> everything looks fine.
>
> I have a larger (customer provided) testcase that exposed this bug after
> rev.161655 (the mem-ref2 merge, may be related to effects on bitfields).
> So if suitable, please also approve this patch for 4.6/4.7 branches.
>
> Thanks,
> Chung-Lin
>
> 2012-03-10 Chung-Lin Tang <cltang@codesourcery.com>
>
> PR rtl-optimization/52528
> * combine.c (can_combine_p): Add setting of subst_low_luid
> before call to expand_field_assignment().
OK for mainline, 4.7 branch (once 4.7.0 is released) and 4.6 branch, modulo:
+ /* The simplification in expand_field_assignment() may call back to
+ get_last_value(), so set safe guard here. */
+ subst_low_luid = DF_INSN_LUID (insn);
No () in comments, just use the function name.
--
Eric Botcazou