[llvm] r185712 - ARM: Fix incorrect pack pattern

Arnold Schwaighofer aschwaighofer at apple.com
Fri Jul 5 12:01:59 PDT 2013


r185714

On Jul 5, 2013, at 1:48 PM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:

> An asr of 16 to 31. I’ll add that in a sec.
> 
> 
> On Jul 5, 2013, at 1:37 PM, Jim Grosbach <grosbach at apple.com> wrote:
> 
>> Would we not also want to add a pattern which matches an arithmetic shift of [17..31]?
>> 
>> -Jim
>> 
>> On Jul 5, 2013, at 11:28 AM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
>> 
>>> Author: arnolds
>>> Date: Fri Jul  5 13:28:39 2013
>>> New Revision: 185712
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=185712&view=rev
>>> Log:
>>> ARM: Fix incorrect pack pattern
>>> 
>>> A "pkhtb x, x, y asr #num" uses the lower 16 bits of "y asr #num" and packs them
>>> in the bottom half of "x". An arithmetic and logic shift are only equivalent in
>>> this context if the shift amount is 16. We would be shifting in ones into the
>>> bottom 16bits instead of zeros if "y" is negative.




More information about the llvm-commits mailing list