On 10/1/18 9:52 PM, Peter Bergner wrote:
> On 10/1/18 7:45 AM, H.J. Lu wrote:
>> You may have undone:
>>
>> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=218059
> 
> Yes, the code above also needed to be modified to handle conflicts being
> added at definitions rather than at uses.  The patch below does that.
> I don't really have access to a i686 (ie, 32-bit) system to test on and
> I'm not sure how to force the test to be run in 32-bit mode on a 64-bit
> build, but it does fix the assembler for the pr63534.c test case.
> 
> That said, looking at the rtl for the test case, I see the following
> before RA:
> 
> (insn 5 2 6 2 (set (reg:SI 3 bx)
>         (reg:SI 82)) "pr63534.c":10 85 {*movsi_internal}
>      (nil))
> (call_insn 6 5 7 2 (call (mem:QI (symbol_ref:SI ("bar") [flags 0x41]  
> <function_decl 0x7f30c7548000 bar>) [0 barD.1498 S1 A8])
>         (const_int 0 [0])) "pr63534.c":10 687 {*call}
>      (expr_list:REG_DEAD (reg:SI 3 bx)
>         (expr_list:REG_CALL_DECL (symbol_ref:SI ("bar") [flags 0x41]  
> <function_decl 0x7f30c7548000 bar>)
>             (nil)))
>     (expr_list (use (reg:SI 3 bx))
>         (nil)))
> (insn 7 6 8 2 (set (reg:SI 3 bx)
>         (reg:SI 82)) "pr63534.c":11 85 {*movsi_internal}
>      (expr_list:REG_DEAD (reg:SI 82)
>         (nil)))
> (call_insn 8 7 0 2 (call (mem:QI (symbol_ref:SI ("bar") [flags 0x41]  
> <function_decl 0x7f30c7548000 bar>) [0 barD.1498 S1 A8])
>         (const_int 0 [0])) "pr63534.c":11 687 {*call}
>      (expr_list:REG_DEAD (reg:SI 3 bx)
>         (expr_list:REG_CALL_DECL (symbol_ref:SI ("bar") [flags 0x41]  
> <function_decl 0x7f30c7548000 bar>)
>             (nil)))
>     (expr_list (use (reg:SI 3 bx))
>         (nil)))
> 
> Now that we handle conflicts at definitions and the pic hard reg
> is set via a copy from the pic pseudo, my PATCH 2 is setup to
> handle exactly this scenario (ie, a copy between a pseudo and
> a hard reg).  I looked at the asm output from a build with both
> PATCH 1 and PATCH 2, and yes, it also does not add the conflict
> between the pic pseudo and pic hard reg, so our other option to
> fix PR87479 is to apply PATCH 2.  However, since PATCH 2 handles
> the pic pseudo and pic hard reg conflict itself, that means we
> don't need the special pic conflict code and it can be removed!
> I'm going to update PATCH 2 to remove that pic handling code
> and send it through bootstrap and regtesting.
> 
> H.J., can you confirm that the following patch not only fixes
> the bug you opened, but also doesn't introduce any more?
> Once I've updated PATCH 2, I'd like you to test/bless that
> one as well.  Thanks.
Haven't looked at the patch yet.  The easiest (but not fastest) way to
build i686 native is gcc45 in the build farm.

Jeff

Reply via email to