[ARM] Recognize VIDUP from BUILDVECTORs of additions
authorDavid Green <david.green@arm.com>
Tue, 27 Apr 2021 18:33:24 +0000 (19:33 +0100)
committerDavid Green <david.green@arm.com>
Tue, 27 Apr 2021 18:33:24 +0000 (19:33 +0100)
commit8de7d8b2c289acfb866248b798bea9a755b198d7
treeb391cdfea901443217e5efa3f6d6e5bb4ebbd780
parent268f1963af335b65c9c3f99621eccfe106454e8e
[ARM] Recognize VIDUP from BUILDVECTORs of additions

This adds a pattern to recognize VIDUP from BUILD_VECTOR of incrementing
adds. This can come up from either geps or adds, and came up recently in
D100550. We are just looking for a BUILD_VECTOR where each lane is an
add of the first lane with N*i, where i is the lane and N is one of 1,
2, 4, or 8, supported by the VIDUP instruction.

Differential Revision: https://reviews.llvm.org/D101263
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-tailpred-loopinvariant.ll
llvm/test/CodeGen/Thumb2/mve-vidup.ll