[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org 2012-01-19 10:48:05 UTC --- Author: jakub Date: Thu Jan 19 10:47:59 2012 New Revision: 183301 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183301 Log: PR rtl-optimization/48496 * src/ia64/ffi.c (ffi_call): Fix up aliasing violations. Modified: trunk/libffi/ChangeLog trunk/libffi/src/ia64/ffi.c
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Priority|P1 |P2 --- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org 2012-01-19 11:27:07 UTC --- With the ffi.c fix this should be P2-ish.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org 2012-01-14 17:45:28 UTC --- Doesn't this code violate strict aliasing though? And, it passes with -fno-strict-aliasing. Therefore, I think it would be better to fix up the strict aliasing violation in libffi. completely untested patch: --- libffi/src/ia64/ffi.c2010-08-11 21:08:14.0 +0200 +++ libffi/src/ia64/ffi.c2012-01-14 18:43:35.652923850 +0100 @@ -324,13 +324,17 @@ ffi_call(ffi_cif *cif, void (*fn)(void), case FFI_TYPE_FLOAT: if (gpcount 8 fpcount 8) stf_spill (stack-fp_regs[fpcount++], *(float *)avalue[i]); - stack-gp_regs[gpcount++] = *(UINT32 *)avalue[i]; + { +UINT32 tmp; +memcpy (tmp, avalue[i], sizeof (UINT32)); +stack-gp_regs[gpcount++] = tmp; + } break; case FFI_TYPE_DOUBLE: if (gpcount 8 fpcount 8) stf_spill (stack-fp_regs[fpcount++], *(double *)avalue[i]); - stack-gp_regs[gpcount++] = *(UINT64 *)avalue[i]; + memcpy (stack-gp_regs[gpcount++], avalue[i], sizeof (UINT64)); break; case FFI_TYPE_LONGDOUBLE: With that IMHO this should be just a P2, not P1.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #9 from Richard Guenther rguenth at gcc dot gnu.org 2012-01-10 11:18:32 UTC --- Bootstrap/test seems to work for Andreas (and for my own internal testing) but still no results from HJ on gcc-testresults. Still the testcase is broken, reproducible with a bare cross to ia64-linux and just -O2 (-fexceptions not needed). More reduced testcase: typedef struct { unsigned long x[2]; } fpreg; unsigned long ffi_call(long i, void **avalue, fpreg *fpr) { asm (stf.spill %0 = %1%P0 : =m (*fpr) : f(*(double *)avalue[i]));; return *(unsigned long *)avalue[i]; }
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |NEW CC||bernds at gcc dot gnu.org, ||jakub at gcc dot gnu.org, ||uweigand at gcc dot gnu.org --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2011-12-08 08:57:16 UTC --- Can be still reproduced with current trunk, at least on the short testcase.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #7 from Alexander Monakov amonakov at gcc dot gnu.org 2011-08-03 09:00:34 UTC --- (In reply to comment #6) Does bootstrap work again? I haven't checked bootstrap, but the reduced testcase still induces the same error, and Andreas' gcc-testresults@ mails suggest that bootstrap is still broken after appearing fixed for June 15 - July 13.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED |WAITING Last reconfirmed||2011.08.02 13:59:49 Ever Confirmed|0 |1 --- Comment #6 from Richard Guenther rguenth at gcc dot gnu.org 2011-08-02 13:59:49 UTC --- Does bootstrap work again?
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #5 from Andreas Schwab sch...@linux-m68k.org 2011-06-01 10:57:40 UTC --- Bootstrap broken for 2 months now.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #4 from Vladimir Makarov vmakarov at redhat dot com 2011-04-11 17:11:37 UTC --- The new big IRA patch just triggered a latent reload bug. The code in question is in function reload_as_needed /* If this was an ASM, make sure that all the reload insns we have generated are valid. If not, give an error and delete them. */ if (asm_noperands (PATTERN (insn)) = 0) for (p = NEXT_INSN (prev); p != next; p = NEXT_INSN (p)) if (p != insn INSN_P (p) GET_CODE (PATTERN (p)) != USE (recog_memoized (p) 0 || (extract_insn (p), ! constrain_operands (1 { error_for_asm (insn, %asm% operand requires impossible reload); delete_insn (p); } } A previous insn P has a spilled pseudo and that results in the error generation because spilled pseudos are changed by memory later. I guess the above code is wrong if a previous insn has a spilled pseudo. The bug did not occur before the big IRA patch because the pseudo in question happened not to be spilled. I should mention that it is more profitable to spill the pseudo and the new IRA makes the right decision (which results in live range shrinkage and decreasing register pressure). I could make a patch (preventing the error generation if there are spilled pseudos in insn P) but I think that reload maintainers would do that different (e.g. moving the check after changing spilled pseudos by memory) or make a better patch.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #3 from H.J. Lu hjl.tools at gmail dot com 2011-04-09 16:36:28 UTC --- (In reply to comment #2) Can you try again after: 2011-04-08 Vladimir Makarov vmaka...@redhat.com PR 48435 * ira-color.c (setup_profitable_hard_regs): Add comments. Don't take prohibited hard regs into account. (setup_conflict_profitable_regs): Rename to get_conflict_profitable_regs. (check_hard_reg_p): Check prohibited hard regs. It doesn't help.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 Alexander Monakov amonakov at gcc dot gnu.org changed: What|Removed |Added CC||vmakarov at redhat dot com Known to work||4.6.0 Known to fail||4.7.0 --- Comment #1 from Alexander Monakov amonakov at gcc dot gnu.org 2011-04-08 11:26:35 UTC --- This error bisects to svn revision 171649 (big IRA cover classes patch).
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org 2011-04-08 21:11:06 UTC --- Can you try again after: 2011-04-08 Vladimir Makarov vmaka...@redhat.com PR 48435 * ira-color.c (setup_profitable_hard_regs): Add comments. Don't take prohibited hard regs into account. (setup_conflict_profitable_regs): Rename to get_conflict_profitable_regs. (check_hard_reg_p): Check prohibited hard regs.
[Bug rtl-optimization/48496] [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.7.0