> 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.
> 2012-03-10 Chung-Lin Tang <clt...@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.