* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
@ 2011-01-24 23:07 ` hjl.tools at gmail dot com
2011-01-24 23:29 ` hjl.tools at gmail dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 23:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 23:01:31 UTC ---
RDI is used to pass the first argument.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
2011-01-24 23:07 ` [Bug target/47449] " hjl.tools at gmail dot com
@ 2011-01-24 23:29 ` hjl.tools at gmail dot com
2011-01-24 23:31 ` hjl.tools at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 23:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 23:16:57 UTC ---
fwprop1 turns:
(insn 2 4 3 2 (set (reg/v/f:DI 61 [ trans ])
(zero_extend:DI (reg:SI 5 di [ trans ]))) x.c:4 115
{*zero_extendsidi2_r
ex64}
(nil))
(note 3 2 6 2 NOTE_INSN_FUNCTION_BEG)
(insn 6 3 7 2 (parallel [
(set (reg:SI 62 [ ret ])
(asm_operands:SI ("negl %0
") ("=D") 0 []
[]
[] x.c:9))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) x.c:6 -1
(nil))
into
(insn 6 3 9 2 (parallel [
(set (reg:SI 62 [ ret ])
(asm_operands:SI ("negl %0
") ("=D") 0 []
[]
[] x.c:9))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) x.c:6 -1
(expr_list:REG_UNUSED (reg:QI 18 fpsr)
(expr_list:REG_UNUSED (reg:QI 17 flags)
(nil))))
IRA can't deal with it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
2011-01-24 23:07 ` [Bug target/47449] " hjl.tools at gmail dot com
2011-01-24 23:29 ` hjl.tools at gmail dot com
@ 2011-01-24 23:31 ` hjl.tools at gmail dot com
2011-01-24 23:37 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 23:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 23:18:59 UTC ---
fwprop can't handle subreg properly.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-01-24 23:31 ` hjl.tools at gmail dot com
@ 2011-01-24 23:37 ` pinskia at gcc dot gnu.org
2011-01-24 23:38 ` hjl.tools at gmail dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-01-24 23:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-01-24 23:21:48 UTC ---
(In reply to comment #3)
> fwprop can't handle subreg properly.
Huh? You don't show where the subreg of 61 is being used. As far as I can
tell what fwprop is doing is correct. I think we should just disable the code
which Alan added for doing fwprop for SMALL_REGISTERS(sp.) targets
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-01-24 23:37 ` pinskia at gcc dot gnu.org
@ 2011-01-24 23:38 ` hjl.tools at gmail dot com
2011-01-24 23:45 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 23:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 23:27:48 UTC ---
Before fwprop1:
---
;; Pred edge ENTRY [100.0%] (fallthru)
(note 4 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 2 4 3 2 (set (reg/v/f:DI 61 [ trans ])
(zero_extend:DI (reg:SI 5 di [ trans ]))) x.c:4 115
{*zero_extendsidi2_r
ex64}
(nil))
(note 3 2 6 2 NOTE_INSN_FUNCTION_BEG)
(insn 6 3 7 2 (parallel [
(set (reg:SI 62 [ ret ])
(asm_operands:SI ("negl %0
") ("=D") 0 []
[]
[] x.c:9))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) x.c:6 -1
(nil))
(insn 7 6 8 2 (set (reg/v:SI 59 [ ret ])
(reg:SI 62 [ ret ])) x.c:6 64 {*movsi_internal}
(nil))
(insn 8 7 9 2 (set (reg:SI 5 di)
(subreg/s/u:SI (reg/v/f:DI 61 [ trans ]) 0)) x.c:7 64 {*movsi_internal}
(nil))
(call_insn 9 8 10 2 (call (mem:QI (symbol_ref:DI ("bar") [flags 0x41]
<function
_decl 0x7fa8a422ef00 bar>) [0 S1 A8])
(const_int 0 [0])) x.c:7 623 {*call_0}
(nil)
(expr_list:REG_DEP_TRUE (use (reg:SI 5 di))
(nil)))
(insn 10 9 14 2 (set (reg:SI 60 [ <retval> ])
(reg:SI 62 [ ret ])) x.c:7 64 {*movsi_internal}
(nil))
(insn 14 10 17 2 (set (reg/i:SI 0 ax)
(reg:SI 62 [ ret ])) x.c:9 64 {*movsi_internal}
(nil))
(insn 17 14 0 2 (use (reg/i:SI 0 ax)) x.c:9 -1
(nil))
;; End of basic block 2 -> ( 1)
;; lr out 0 [ax] 6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; Succ edge EXIT [100.0%] (fallthru)
---
After fwprop1:
---
;; Pred edge ENTRY [100.0%] (fallthru)
(note 4 0 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(note 3 4 6 2 NOTE_INSN_FUNCTION_BEG)
(insn 6 3 9 2 (parallel [
(set (reg:SI 62 [ ret ])
(asm_operands:SI ("negl %0
") ("=D") 0 []
[]
[] x.c:9))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
]) x.c:6 -1
(expr_list:REG_UNUSED (reg:QI 18 fpsr)
(expr_list:REG_UNUSED (reg:QI 17 flags)
(nil))))
(call_insn 9 6 14 2 (call (mem:QI (symbol_ref:DI ("bar") [flags 0x41]
<function
_decl 0x7fa8a422ef00 bar>) [0 S1 A8])
(const_int 0 [0])) x.c:7 623 {*call_0}
(expr_list:REG_DEAD (reg:SI 5 di)
(nil))
(expr_list:REG_DEP_TRUE (use (reg:SI 5 di))
(nil)))
(insn 14 9 17 2 (set (reg/i:SI 0 ax)
(reg:SI 62 [ ret ])) x.c:9 64 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 62 [ ret ])
(nil)))
(insn 17 14 0 2 (use (reg/i:SI 0 ax)) x.c:9 -1
(nil))
;; End of basic block 2 -> ( 1)
;; lr out 0 [ax] 6 [bp] 7 [sp] 16 [argp] 20 [frame]
;; md out
;; Succ edge EXIT [100.0%] (fallthru)
---
For some reason, fwprop1 doesn't remove
(insn 2 4 3 2 (set (reg/v/f:DI 61 [ trans ])
(reg:DI 5 di [ trans ])) x.c:4 62 {*movdi_internal_rex64}
(nil))
for 64bit.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-01-24 23:38 ` hjl.tools at gmail dot com
@ 2011-01-24 23:45 ` pinskia at gcc dot gnu.org
2011-01-25 0:00 ` bonzini at gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-01-24 23:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-01-24 23:31:30 UTC ---
ok, first off the issue is proping over the asm that might clobber EDI.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (5 preceding siblings ...)
2011-01-24 23:45 ` pinskia at gcc dot gnu.org
@ 2011-01-25 0:00 ` bonzini at gnu dot org
2011-01-25 2:01 ` bonzini at gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2011-01-25 0:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #7 from Paolo Bonzini <bonzini at gnu dot org> 2011-01-24 23:45:01 UTC ---
Is this a regression?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (6 preceding siblings ...)
2011-01-25 0:00 ` bonzini at gnu dot org
@ 2011-01-25 2:01 ` bonzini at gnu dot org
2011-01-25 2:13 ` [Bug target/47449] [x32] " hjl.tools at gmail dot com
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2011-01-25 2:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #8 from Paolo Bonzini <bonzini at gnu dot org> 2011-01-24 23:47:10 UTC ---
Ah, [32] means 32-bit x86_64...
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (7 preceding siblings ...)
2011-01-25 2:01 ` bonzini at gnu dot org
@ 2011-01-25 2:13 ` hjl.tools at gmail dot com
2011-01-25 3:16 ` [Bug middle-end/47449] " hjl at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-25 2:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 23:50:05 UTC ---
PR 47379 is another fwprop issue with subreg.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (8 preceding siblings ...)
2011-01-25 2:13 ` [Bug target/47449] [x32] " hjl.tools at gmail dot com
@ 2011-01-25 3:16 ` hjl at gcc dot gnu.org
2011-01-25 3:37 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-25 3:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #10 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-25 02:13:17 UTC ---
Author: hjl
Date: Tue Jan 25 02:13:14 2011
New Revision: 169191
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169191
Log:
Don't propagate zero/sign extended hard register.
gcc/
2011-01-24 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47449
* fwprop.c (forward_propagate_subreg): Don't propagate zero/sign
extended hard register.
gcc/testsuite/
2011-01-24 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47449
* gcc.target/i386/pr47449.c: New.
Added:
branches/x32/gcc/testsuite/gcc.target/i386/pr47449.c
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/fwprop.c
branches/x32/gcc/testsuite/ChangeLog.x32
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (9 preceding siblings ...)
2011-01-25 3:16 ` [Bug middle-end/47449] " hjl at gcc dot gnu.org
@ 2011-01-25 3:37 ` hjl.tools at gmail dot com
2011-01-25 15:45 ` hjl at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-25 3:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-01/msg01701.htm
| |l
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-25 02:17:29 UTC ---
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01701.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (10 preceding siblings ...)
2011-01-25 3:37 ` hjl.tools at gmail dot com
@ 2011-01-25 15:45 ` hjl at gcc dot gnu.org
2011-07-05 12:48 ` [Bug rtl-optimization/47449] " hjl at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-25 15:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #12 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-25 15:14:54 UTC ---
Author: hjl
Date: Tue Jan 25 15:14:49 2011
New Revision: 169234
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169234
Log:
Don't propagate hard register.
2011-01-25 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47449
* fwprop.c (forward_propagate_subreg): Don't propagate hard
register.
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/fwprop.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (11 preceding siblings ...)
2011-01-25 15:45 ` hjl at gcc dot gnu.org
@ 2011-07-05 12:48 ` hjl at gcc dot gnu.org
2011-07-05 13:15 ` hjl.tools at gmail dot com
2011-08-06 14:37 ` hjl at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-07-05 12:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #13 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-07-05 12:47:38 UTC ---
Author: hjl
Date: Tue Jul 5 12:47:35 2011
New Revision: 175849
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175849
Log:
Don't propagate hard registers in forward_propagate_subreg.
2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47449
* fwprop.c (forward_propagate_subreg): Don't propagate hard
register nor zero/sign extended hard register.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fwprop.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (12 preceding siblings ...)
2011-07-05 12:48 ` [Bug rtl-optimization/47449] " hjl at gcc dot gnu.org
@ 2011-07-05 13:15 ` hjl.tools at gmail dot com
2011-08-06 14:37 ` hjl at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-05 13:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-05 13:14:59 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/47449] [x32] can’t find a register in class ‘DIREG’ while reloading ‘asm’
2011-01-24 23:03 [Bug target/47449] New: [32] can’t find a register in class ‘DIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (13 preceding siblings ...)
2011-07-05 13:15 ` hjl.tools at gmail dot com
@ 2011-08-06 14:37 ` hjl at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-08-06 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47449
--- Comment #15 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-08-06 14:36:55 UTC ---
Author: hjl
Date: Sat Aug 6 14:36:52 2011
New Revision: 177512
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177512
Log:
Add testcases for PRs 47449/47446.
2011-08-06 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47449
* gcc.target/i386/pr47449.c: New.
PR target/47446
* gcc.dg/pr47446-1.c: New.
* gcc.dg/pr47446-2.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/pr47446-1.c
trunk/gcc/testsuite/gcc.dg/pr47446-2.c
trunk/gcc/testsuite/gcc.target/i386/pr47449.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 16+ messages in thread