On 10/09/15 12:43, Rainer Orth wrote: > Hi Kyrill, > >> Rainer, could you please check that this patch still fixes the SPARC >> regressions? > unfortunately, it breaks sparc-sun-solaris2.10 bootstrap: compiling > stage2 libiberty/regex.c FAILs: > > Thanks for providing the preprocessed file. I've reproduced and fixed the ICE in this version of the patch. The problem was that I was taking the mode of x before the check of whether a and b are MEMs, after which we would change x to an address_mode reg, thus confusing emit_move_insn. The fix is to take the mode of x and perform the can_conditionally_move_p check after that transformation. Bootstrapped and tested on aarch64 and x86_64. The preprocessed regex.i that Rainer provided now compiles successfully for me on a sparc-sun-solaris2.10 stage-1 cross-compiler. Rainer, thanks for your help so far, could you please try out this patch? Thanks, Kyrill 2015-09-10 Kyrylo Tkachov PR rtl-optimization/67456 PR rtl-optimization/67464 PR rtl-optimization/67465 PR rtl-optimization/67481 * ifcvt.c (noce_try_cmove_arith): Bail out if cannot conditionally move in the mode of x. Handle combination of complex and simple block pairs as well as the case when one is empty. 2015-09-10 Kyrylo Tkachov * gcc.dg/pr67465.c: New test.