This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/47372: [x32] internal compiler error: in simplify_subreg, at simplify-rtx.c:5222


On Tue, Jul 26, 2011 at 1:29 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Jul 26, 2011 at 10:21:11PM +0200, Uros Bizjak wrote:
>> This also works, we look at orig_x that looks like:
>>
>> (mem/u/c:SI (const:DI (unspec:DI [
>> ? ? ? ? ? ? ? ? (symbol_ref:SI ("__sflush") [flags 0x41]
>> <function_decl 0x7f6f2eaad000 __sflush>)
>> ? ? ? ? ? ? ] UNSPEC_GOTPCREL)) [2 S4 A8])
>>
>> So, we look at SImode load, and compare it with SImode (actually
>> ptr_mode) symbol. Will your suggestion work with this RTX?
>
> Then
> ? ? ?if (GET_MODE (orig_x) != GET_MODE (x))
> ? ? ? ?{
> ? ? ? ? ?x = simplify_gen_subreg (GET_MODE (orig_x), x, GET_MODE (x), 0);
> ? ? ? ? ?if (x == NULL_RTX)
> ? ? ? ? ? ?return orig_x;
> ? ? ? ?}
> will work, orig_x is the above SImode MEM, x is (symbol_ref:SI ("__sflush")
> [flags 0x41] <function_decl 0x7f6f2eaad000 __sflush>)
> thus the modes are the same and no simplify_gen_subreg needs to be done, the
> mode is already right.
>

This works for my testcase. I will do a full test.

Thanks.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]