[ARM] Fix VMOVSR pattern requirements
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Tue, 4 Apr 2023 15:45:14 +0000 (16:45 +0100)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Tue, 4 Apr 2023 15:45:14 +0000 (16:45 +0100)
commit0ee891fe2e5704ab790b48af49a3e8ca4935cce7
treec7e58ce2b55536897a229ecaa08c1a2dd7fc2340
parent8ef91099f6162b023b467168e208e0843ce6781f
[ARM] Fix VMOVSR pattern requirements

The required target features for VMOVSR instruction (integer -> MVE
FP register copy) are HasFPRegs and UseVMOVSR (see
https://reviews.llvm.org/D60694).

The instruction selection pattern must use the same set of
requirements (i.e., HasFPRegs instead of HasVFP2). The discrepancy
can cause instruction selection failure when compiling code for
execute-only position-independence mode.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D147523
llvm/lib/Target/ARM/ARMInstrVFP.td
llvm/test/CodeGen/Thumb2/float-ops-vmovsr-nofp-xo.ll [new file with mode: 0644]