[AArch64] Load into zero vector patterns
authorDavid Green <david.green@arm.com>
Wed, 1 Mar 2023 13:54:03 +0000 (13:54 +0000)
committerDavid Green <david.green@arm.com>
Wed, 1 Mar 2023 13:54:03 +0000 (13:54 +0000)
commit83bbd3fdbd75295669cf97967c38810d427c5c25
tree075c6fb8d6c1df3a7cafdc7aa14f2d1ecee9ec1b
parent8e4f8259f75fa3415e3834058cd19a1ae52d9ec6
[AArch64] Load into zero vector patterns

A LDR will implicitly zero the rest of the vector, so vector_insert(zeros,
load, 0) can use a single load. This adds tablegen patterns for both scaled and
unscaled loads, detecting where we are inserting a load into the lower element
of a zero vector.

Differential Revision: https://reviews.llvm.org/D144086
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/test/CodeGen/AArch64/load-insert-zero.ll
llvm/test/CodeGen/AArch64/speculation-hardening-loads.ll