[Bug target/19616] [4.0 regression] missed tail call

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jan 24 23:44:00 GMT 2005


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 23:44 -------
check_sibcall_argument_overlap_1 returns 1 for 
 
(insn 11 0 0 (set (reg:DF 21 xmm0) 
        (float_extend:DF (mem/u/i:SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) 
[3 S4 A32]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF 0.0 [0x0.0p+0]) 
        (nil))) 
 
but it returns 0 for: 
 
(insn 12 11 0 (set (reg:DF 21 xmm0) 
        (reg:DF 58)) -1 (nil) 
    (nil)) 
 
and indeed the above gives a tail call: 
 
extern void bar (double); 
void foo (void) { bar (2.0); } 
 
--> 
;; Function foo (foo) 
 
 
;; Generating RTL for tree basic block 0 
 
;; bar (2.0e+0) [tail call] 
(insn 11 9 12 0 (set (reg:DF 58) 
        (float_extend:DF (mem/u/i:SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) 
[3 S4 A32]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF 2.0e+0 [0x0.8p+2]) 
        (nil))) 
 
(insn 12 11 13 0 (set (reg:DF 21 xmm0) 
        (reg:DF 58)) -1 (nil) 
    (nil)) 
 
(call_insn/j 13 12 14 0 (call (mem:QI (symbol_ref:DI ("bar") [flags 0x41] 
<function_decl 0x2a959879c0 bar>) [0 S1 
A8]) 
        (const_int 0 [0x0])) -1 (nil) 
    (nil) 
    (expr_list:REG_DEP_TRUE (use (reg:DF 21 xmm0)) 
        (nil))) 
 
(barrier 14 13 0) 
 
--> 
        .text 
        .p2align 4,,15 
.globl foo 
        .type   foo, @function 
foo: 
.LFB2: 
        movlpd  .LC1(%rip), %xmm0 
        jmp     bar 
.LFE2: 
        .size   foo, .-foo 
        .section        .eh_frame,"a",@progbits 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616



More information about the Gcc-bugs mailing list