[llvm][AArch64][SVE] Fold literals into math instructions
authorDavid Truby <david.truby@arm.com>
Wed, 13 Oct 2021 14:08:02 +0000 (14:08 +0000)
committerDavid Truby <david.truby@arm.com>
Sun, 17 Oct 2021 10:57:04 +0000 (10:57 +0000)
commit2e0fb007d63cf4d7979c6f6f577e6906145c7b95
treeb17b34e9cc1adadae2d5bbf527efcce825aca351
parent27969c4e00bb3fcfc8cc149864e1b1f7e87a6753
[llvm][AArch64][SVE] Fold literals into math instructions

SVE has predicated literal forms of some instructions for specific
literals, which currently are generated correctly when using ACLE
but not when those instructions are generated directly.

This adds the patterns to generate those instructions when
generating from standard LLVM IR instructions.

Differential Revision: https://reviews.llvm.org/D99074
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
llvm/test/CodeGen/AArch64/sve-fp-immediates-merging.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-intrinsics-fp-arith-imm.ll [new file with mode: 0644]