[PATCH] ARM/NEON: Improve codegen for long sext/zext operations.

James Molloy James.Molloy at arm.com
Fri Mar 15 01:35:53 PDT 2013


Hi Pete,

I'm not sure the documentation is entirely correct. It states that
ExpandVectorExtension is designed to work on vectors "where
size(DestVec) > 2*size(SrcVec)", but that's not quite true. For example,
it's not designed to work on v4i8 -> v4i32 (this already produces good
code).

It's where sizeof(DestVec) > 128 bits (i.e. the vector needs to be split
across multiple Q registers).

Could you please change the documentation to reflect this? I'd also be
happier if there was a precondition assert in the function to check its
DestVT.getSizeInBits() > 128, in order to catch cases where a someone
incorrectly sets smaller vectors to Custom and this code gets improperly
called.

Other than that, it looks good to me.

Cheers,

James

On Fri, 2013-03-15 at 06:43 +0000, Pete Couperus wrote:
> Hello,
>
> The ARM backend currently has poor codegen for long sext/zext
> operations, such as v8i8 -> v8i32.
> This patch addresses this by performing a custom expansion in ARMISelLowering.
> This partially addresses PR14867 (http://llvm.org/bugs/show_bug.cgi?id=14867).
> Please review!
> Thanks,
>
> Pete


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




More information about the llvm-commits mailing list