[PATCH] AArch64: convert VPR64/VPR128 to RegisterOperands

Jiangning Liu liujiangning1 at gmail.com
Thu Sep 12 20:13:31 PDT 2013


Tim,

The code change looks very good for me. It's so nice to see you introduced
BinOpFrag to simplify those two addhn patterns.

I want to confirm with you that, the changes from VPR64 operand to VPR128
in patterns NeonI_3VDN_3Op and N2VShR_Narrow_Hi are because of the static
checking of "let Constraints = "$src = $Rd";", true?

Does the tblgen problem around InstAlias affect asm parser? I mean with
this patch applied can end-user use "mov vD.8b, vN.8b" instruction in
assembly code or not?

Thanks,
-Jiangning



2013/9/12 Tim Northover <t.p.northover at gmail.com>

> This patch changes the AArch64 backend to use a RegisterOperand rather
> than a RegisterClass for the vector registers.
>
> The difference is that RegisterOperands are essentially aliases for the
> RegisterClass with different printing/parsing methods. This matches almost
> exactly the status of AArch64's vector registers (they use "vN" in SIMD
> instructions but are really either "qN" or "dN").
>
> Previously we had some rather nasty hierarchy of degenerate sub_xxx
> aliases, which Kevin Qin has recently discovered makes it virtually
> impossible to write patterns mapping VPR128 <-> VPR64.
>
> Mostly this appears to simplify the code it touches. The main annoyance is
> that VPR128 and VPR64 become non-trivial operands and so the alias printer
> can't handle them (specifically, there's no way to print "mov vD.8b, vN.8b"
> instead of the "orr" form). However, this is an endemic problem (it already
> hits integer "mov" for example), so I think that's an acceptable sacrifice.
>
> http://llvm-reviews.chandlerc.com/D1656
>
> Files:
>   lib/Target/AArch64/AArch64AsmPrinter.cpp
>   lib/Target/AArch64/AArch64ISelLowering.cpp
>   lib/Target/AArch64/AArch64InstrInfo.td
>   lib/Target/AArch64/AArch64InstrNEON.td
>   lib/Target/AArch64/AArch64RegisterInfo.td
>   lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
>   lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
>   lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
>   lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h
>   test/MC/AArch64/neon-mov.s
>   test/MC/Disassembler/AArch64/neon-instructions.txt
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Thanks,
-Jiangning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130913/2013db94/attachment.html>


More information about the llvm-commits mailing list