[PATCH]Clang and AArch64 backend patches to support sshll/ushll instructions

Tim Northover t.p.northover at gmail.com
Wed Aug 14 09:14:34 PDT 2013


Hi Hao,

Looking very nice! Thanks for working on those changes, they were
rather substantial.

> (1)  Use IR (sext/zext, shufflevector and shl) to implement the ACLE functions. As I also use shift
> left by immediate instruction, I also add support for the shl instruction.

I think one minor change would make this more generic. Instead of
creating NEON_SHLIMM, couldn't you create a normal ISD::SHL operation
where the right-hand side is (say) (NEON_DUP imm)? Then when we get
around to implementing things like USHR we can just reuse that
duplicate node instead of adding more NEON_SHRIMM nodes.

> As I haven't find a better way to implement this, I don't modify this code yet.

Ok, I think I'm happy with that for now.

Other than that, just one minor nit:

+  if (! BVN || ! BVN->isConstantSplat(SplatBits, SplatUndef, SplatBitSize,

I don't think we normally put a space between '!' and its operand.
There are some other places with this too.

Cheers.

Tim.



More information about the llvm-commits mailing list