Skip to content

Commit 4cf0ddd

Browse files
committed
[ARM][MVE] Enable VMOVN for tail predication
These instructions also don't exchange lanes, so make them legal. Differential Revision: https://reviews.llvm.org/D75669
1 parent feb20a1 commit 4cf0ddd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

llvm/lib/Target/ARM/ARMInstrMVE.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,6 +4421,7 @@ class MVE_VxMOVxN<string iname, string suffix, bit bit_28, bit bit_17,
44214421
let Inst{8} = 0b0;
44224422
let Inst{7} = !if(!eq(bit_17, 0), 1, 0);
44234423
let Inst{0} = 0b1;
4424+
let validForTailPredication = 1;
44244425
}
44254426

44264427
multiclass MVE_VxMOVxN_halves<string iname, string suffix,

llvm/unittests/Target/ARM/MachineInstrTest.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ TEST(MachineInstrValidTailPredication, IsCorrect) {
256256
case MVE_VMOVimmi32:
257257
case MVE_VMOVimmi64:
258258
case MVE_VMOVimmi8:
259+
case MVE_VMOVNi16bh:
260+
case MVE_VMOVNi16th:
261+
case MVE_VMOVNi32bh:
262+
case MVE_VMOVNi32th:
259263
case MVE_VMULLBp16:
260264
case MVE_VMULLBp8:
261265
case MVE_VMULLBs16:
@@ -321,6 +325,18 @@ TEST(MachineInstrValidTailPredication, IsCorrect) {
321325
case MVE_VQNEGs16:
322326
case MVE_VQNEGs32:
323327
case MVE_VQNEGs8:
328+
case MVE_VQMOVNs16bh:
329+
case MVE_VQMOVNs16th:
330+
case MVE_VQMOVNs32bh:
331+
case MVE_VQMOVNs32th:
332+
case MVE_VQMOVNu16bh:
333+
case MVE_VQMOVNu16th:
334+
case MVE_VQMOVNu32bh:
335+
case MVE_VQMOVNu32th:
336+
case MVE_VQMOVUNs16bh:
337+
case MVE_VQMOVUNs16th:
338+
case MVE_VQMOVUNs32bh:
339+
case MVE_VQMOVUNs32th:
324340
case MVE_VQRSHL_by_vecs16:
325341
case MVE_VQRSHL_by_vecs32:
326342
case MVE_VQRSHL_by_vecs8:

0 commit comments

Comments
 (0)