[PATCH] Allow encoded 8-bit floating point constants in ARM vmov instructions

Jim Grosbach grosbach at apple.com
Tue Jan 7 10:25:50 PST 2014


Excellent. Thanks!
-Jim
On Jan 7, 2014, at 10:25 AM, David Peixotto <dpeixott at codeaurora.org> wrote:

> I added the extra comment and committed in r198697.
>  
> From: Jim Grosbach [mailto:grosbach at apple.com] 
> Sent: Monday, January 06, 2014 10:16 AM
> To: Renato Golin
> Cc: David Peixotto; Commit Messages and Patches for LLVM
> Subject: Re: [PATCH] Allow encoded 8-bit floating point constants in ARM vmov instructions
>  
>  
> On Dec 20, 2013, at 1:39 PM, Renato Golin <renato.golin at linaro.org> wrote:
> 
> 
> On 20 December 2013 20:12, David Peixotto <dpeixott at codeaurora.org> wrote:
> To make things concrete, I have attached a patch that fixes issue #1 and adds the pre-UAL aliases. It only accepts encoded floats for the fconst aliases.
>  
> Hi David,
>  
> The patch looks good to me, and it doesn't introduce too many changes nor obscure code, so it should be ok to let this in. The tests also look great, thanks!
>  
> I'd still want Jim to share his opinion, though.
>  
> Back in the office from holiday now. Thanks for pushing forward on this. Just in case you still need my input, I completely agree with your assessment and have no objections.
>  
> I would suggest a short comment on the alias definitions in the .td file that these aliases are intentional for added functionality so we get reminded to stop and think if/when we start nuking pre-UAL stuff. We may want to keep these even then.
>  
> -Jim
> 
> 
>  
> Two specific comments:
>  
> -    double RealVal = ARM_AM::getFPImmFloat(Val);
> -    Val = APFloat(APFloat::IEEEdouble, RealVal).bitcastToAPInt().getZExtValue();
> +    float RealVal = ARM_AM::getFPImmFloat(Val);
> +    Val = APFloat(RealVal).bitcastToAPInt().getZExtValue();
>  
> Nice catch, you don't need a double.
>  
> -        Mnemonic == "vfms" || Mnemonic == "vfnms" ||
> +        Mnemonic == "vfms" || Mnemonic == "vfnms" || Mnemonic == "fconsts" ||
>  
> Was the fconstd already there?
>  
> cheers,
> --renato

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140107/8b73ef5e/attachment.html>


More information about the llvm-commits mailing list