Validity of SUBREG+AND-imm transformations

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Fri Mar 11 15:24:00 GMT 2016


On 08/03/16 19:11, Jeff Law wrote:
> On 03/08/2016 11:49 AM, Richard Henderson wrote:
>> On 03/07/2016 02:49 PM, Jeff Law wrote:
>>> On 03/07/2016 03:44 AM, Kyrill Tkachov wrote:
>>>>>
>>>>
>>>> The RTL documentation for ASHIFT and friends says that the shift amount
>>>> must be:
>>>> "a fixed-point mode or be a constant with mode @code{VOIDmode}; which
>>>> mode is determined by the mode called for in the machine description
>>>> entry for the left-shift instruction". For example, on the VAX, the mode
>>>> of @var{c} is @code{QImode} regardless of @var{m}.
>>> Use QImode in the named pattern/expander and use the other modes in an
>>> unnamed/anonymous pattern.
>>
>> I thought the same thing you did.  But I tried it out on the aarch64
>> port and it didn't work.  Combine kept coming back to the QImode pattern.
>>
>> I didn't want to look into it any farther than that, lest I fall down a
>> rabbit hole, but there's more to it than just tweaking the patterns.
> Strange.  Probably worth some investigating for gcc-7.
>

FYI I've attached an example patch that I had implemented for my original proposal to PR 70119.

Kyrill

> jeff



More information about the Gcc mailing list