diff --git a/llvm/lib/Target/ARM/ARMInstrMVE.td b/llvm/lib/Target/ARM/ARMInstrMVE.td --- a/llvm/lib/Target/ARM/ARMInstrMVE.td +++ b/llvm/lib/Target/ARM/ARMInstrMVE.td @@ -909,6 +909,11 @@ let Inst{3-1} = Qm{2-0}; let Inst{0} = bit_0; let horizontalReduction = 1; + // Allow tail predication for non-exchanging versions. As this is also a + // horizontalReduction, ARMLowOverheadLoops will also have to check that + // the vector operands contain zeros in their false lanes for the instruction + // to be properly valid. + let validForTailPredication = !eq(X, 0); } multiclass MVE_VMLAMLSDAV_A