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] Exploiting dual mode operation, implementation.


Hello,
Thank you for your response.
I'm sorry for my late response, 
I was on a couple of weeks leave for exams.

> Unfortunately, you don't
> describe the patterns you've encountered and how/why calling
> make_compound_operation helps.
Well, the simplification in which I've used 
make_compound_operation was ment to simplify patterns like:
set (reg:DI 100) (sign_extend:DI (subreg:SI (reg:DI 10)))
set (reg:DI 200) (sign_extend:DI (subreg:SI (reg:DI 20)))
set (reg:CC 300) (compare:CC (reg:DI 100) (reg:DI 200))
into this:
set (reg:CC 300) 
(compare:CC (subreg:SI (reg:DI 10)) (subreg:SI (reg:DI 20)))

The problem is that paterns like 
(sign_extend:DI (subreg:SI (reg:DI 10)))
are transformed to this:
(ashiftrt:DI (ashift:DI (reg:DI 10)
        (const_int 32 [0x20]))
    (const_int 32 [0x20]))
My solution was to export make_compound_operation and transform 
the pattern back to it's original pattern.
>From your note I understood that this is not recommended.
Do you think that I should look for the transformed pattern directly?
meaning that if I find:
set (reg:DI 100) (ashiftrt:DI (ashift:DI (reg:DI 10)
                  (const_int 32 [0x20]))
                   (const_int 32 [0x20]))
set (reg:DI 200) (ashiftrt:DI (ashift:DI (reg:DI 20)
                  (const_int 32 [0x20]))
                   (const_int 32 [0x20]))
set (reg:CC 300) (compare:CC (reg:DI 100) (reg:DI 200))
I should simplify it into this:
set (reg:CC 300) 
(compare:CC (subreg:SI (reg:DI 10)) (subreg:SI (reg:DI 20)))

This should work, but I'm not sure about the general case in which
the mode of the registers and the sign extensions can be any mode.

Thanks,
Leehod.


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