[AArch64][GlobalISel] Add a post-legalize combine for lowering vector-immediate G_ASH...
authorAmara Emerson <amara@apple.com>
Mon, 21 Sep 2020 22:03:29 +0000 (15:03 -0700)
committerAmara Emerson <amara@apple.com>
Mon, 21 Sep 2020 23:04:52 +0000 (16:04 -0700)
commita513fdec90de6b0719e8dc4f079bbdd78eb9aaf1
treeb98efb810d1488e6ab7a026d0b7a97a620391902
parent3a799deed72963d124cc9ab8141fb32976cfc846
[AArch64][GlobalISel] Add a post-legalize combine for lowering vector-immediate G_ASHR/G_LSHR.

In order to select the immediate forms using the imported patterns, we need to
lower them into new G_VASHR/G_VLSHR target generic ops. Add a combine to do this
matching build_vector of constant operands.

With this, we get selection for free.
llvm/lib/Target/AArch64/AArch64Combine.td
llvm/lib/Target/AArch64/AArch64InstrGISel.td
llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-vashr-vlshr.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir