[AArch64][SVE] Support logical operation BIC with DestructiveBinary patterns
authorzhongyunde <zhongyunde@huawei.com>
Fri, 11 Nov 2022 01:10:14 +0000 (09:10 +0800)
committerzhongyunde <zhongyunde@huawei.com>
Fri, 11 Nov 2022 01:15:50 +0000 (09:15 +0800)
commitffb109b6852d248c9d2e3202477dccf20aac7151
tree5c52bbb82ba9a314bb34dbaf3c96ee954993d752
parent6890b9b71e525020ab58d436336664beede71575
[AArch64][SVE] Support logical operation BIC with DestructiveBinary patterns

Logical operation BIC with DestructiveBinary patterns is temporarily removed as
causes an assert (commit 3c382ed71f15), so try to fix that.
The most significant being that for pseudo instructions that do not have real instructions (including movpfx'd ones) that cover all combinations of register allocation, their expansion will be broken. This is the main reason the zeroing is an experimental feature because it has known bugs.
So we add an extra LSL for movprfx expand BIC_ZPZZ_ZERO A, P, A, A when necessary.
  movprfx z0.s, p0/z, z0.s
  lsl z0.b, p0/m, z0.b, #0
  bic z0.s, p0/m, z0.s, z0.s

Depends on D88595
llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/test/CodeGen/AArch64/sve-intrinsics-int-arith-merging.ll
llvm/test/CodeGen/AArch64/sve-intrinsics-int-arith-merging.mir [new file with mode: 0644]