This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/56148] [4.8 Regression] inline asm matching constraint with different mode
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Feb 2013 16:24:39 +0000
- Subject: [Bug inline-asm/56148] [4.8 Regression] inline asm matching constraint with different mode
- Auto-submitted: auto-generated
- References: <bug-56148-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56148
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu.org
--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2013-02-12 16:24:39 UTC ---
(in my previous post I of course mean inputs and constraints...)
Breaking down the insn once more in something that's more readable
to me at least:
(parallel [
(set (reg:DI 63 [ a ]) (asm_in[0] (reg:SI 67) "0"))
(set (reg:DI 64 [ c ]) (asm_in[1] (reg:DI 65) "mr"))
(set (reg:DI 65 [ d ]) (asm_in[2] (reg:SI 69) "1"))
(set (reg:DI 66 [ b ]) (asm_in[3] (reg:DI 65) "2"))
(asm_in[4] (reg:SI 67) "3")])
so
- r67:SI must match r63:DI
- r69:SI must match r64:DI
- r65:DI must match r65:DI
- r67:SI must match r66:DI
The last constraint comes from CSE, which transforms:
[ (reg:SI 67)
(reg:DI 68)
(reg:SI 69)
(reg:DI 70)
(reg:SI 71) ]
to
[ (reg:SI 67)
(reg/f:DI 68)
(reg:SI 69)
(reg/f:DI 68)
(reg:SI 67) ]
because r70 and r68 have the same value before CSE:
6: {r68:DI=frame:DI-0x10;clobber flags:CC;}
8: {r70:DI=frame:DI-0x10;clobber flags:CC;}
and CSE cleans that up:
6: {r68:DI=frame:DI-0x10;clobber flags:CC;}
8: r70:DI=r68:DI
Disabling or undoing that transformation makes the ICE disappear.
This is also in effect what old reload does with reload insn 21.