[aarch64-port-dev ] RFR: 8179933: aarch64: incorrect match rule for immL_63 and immL_255
Andrew Dinn
adinn at redhat.com
Fri May 12 09:28:14 UTC 2017
On 12/05/17 10:14, Zhongwei Yao wrote:
> On 12 May 2017 at 16:14, Andrew Haley <aph at redhat.com
> <mailto:aph at redhat.com>> wrote:
>>So it's
>>
>> ((aLong >> 63) >>> 63)
>>
>>This is so weird I don't know what to think about it.
>
> Yeah, it is weird. I was thinking (aLong >>> 63) should be enough. Shall
> we just remove this pattern?
The key question is who inserted this rule and for what reason?
If the front end actually generates the node graph
(URShiftL (RShiftL src1 63) 63))
then we need this rule to translate it to the minimal instruction sequence.
Of course, an alternative might be to make the front end implement a
generic optimization to simplify this pattern, say as an ideal transform
on the rshift node
(URShiftL (RShiftL X 63) 63))
==>
(URShiftL X 63)
In fact, I think a more general transform would be ok
(URShiftL (RShiftL X IConst) 63)) (for any value of IConst)
==>
(URShiftL X 63)
I can see how that second graph might be more likely to actually turn up
in a compilation.
Either way the important thing is to determine whether a subgraph of
this form actually occurs.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the aarch64-port-dev
mailing list