[AArch64] Generalize extract-high DUP extension to MOVI/MVNI.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 16 Jun 2015 01:18:14 +0000 (01:18 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 16 Jun 2015 01:18:14 +0000 (01:18 +0000)
commit8c7754b9656fb1b539d61284a03a74cbe188c9e4
tree9385c093cd748179b4a73365d04b0833380c2a18
parentd300722b932d03abf62ca6af65a038af7c112007
[AArch64] Generalize extract-high DUP extension to MOVI/MVNI.

These are really immediate DUPs, and suffer from the same problem
with long instructions with a high/2 variant (e.g. smull).

By extending a MOVI (or DUP, before this patch), we can avoid an ext
on the other operand of the long instruction, e.g. turning:
    ext.16b v0, v0, v0, #8
    movi.4h v1, #0x53
    smull.4s  v0, v0, v1
into:
    movi.8h v1, #0x53
    smull2.4s  v0, v0, v1

While there, add a now-necessary combine to fold (VT NVCAST (VT x)).

llvm-svn: 239799
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/arm64-neon-2velem-high.ll