[PATCH] AArch64 Neon scalar saturating accumulated of unsigned value instructions

Tim Northover t.p.northover at gmail.com
Tue Oct 8 08:46:38 PDT 2013


Hi Chad,

> This patch is for scalar saturating accmulated of unsigned value
> (SUQADD/USQADD).  According to the documentation I have it only has two
> operands, one input and one output, but perhaps I'm missing something.

There's only two registers in the assembly, but the destination is an
accumulator. Ignoring saturation they calculate "Rd = Rd + Rn" and for
CodeGen purposes (and to actually be useful as intrinsics) LLVM has to
know what the LHS is. Think about "return vuqaddb_s8(a);". What's
being added to 'a'?

This is usually handled by having instructions and intrinsics with all
3 operands and then using "let Constraints = "..." on the Instructions
so that the register-allocator knows that "lhs" and "val" actually
have to be in the same register.

Cheers.

Tim.



More information about the llvm-commits mailing list