On 13/12/2024 14:29, Christophe Lyon wrote:
> On Tue, 10 Dec 2024 at 13:14, Richard Earnshaw (lists)
> <richard.earns...@arm.com> wrote:
>>
>> On 09/12/2024 21:11, Christophe Lyon wrote:
>>> In this PR, we have to handle a case where MVE predicates are supplied
>>> as a const_int, where individual predicates have illegal boolean
>>> values (such as 0xc for a 4-bit boolean predicate).  To avoid the ICE,
>>> fix the constant (any non-zero value is converted to all 1s) and emit
>>> a warning.
>>>
>>> On MVE, V8BI and V4BI multi-bit masks are interpreted byte-by-byte at
>>> instruction level, but end-users should describe lanes rather than
>>> bytes (so all bytes of a true-predicated lane should be '1'), see the
>>> section on MVE intrinsics in the Arm ACLE specification.
>>>
>>> Since force_lowpart_subreg cannot handle const_int (because they have VOID 
>>> mode),
>>> use gen_lowpart on them, force_lowpart_subreg otherwise.
>>>
>>> 2024-11-20  Christophe Lyon  <christophe.l...@linaro.org>
>>>           Jakub Jelinek  <ja...@redhat.com>
>>>
>>>       PR target/114801
>>>       gcc/
>>>       * config/arm/arm-mve-builtins.cc
>>>       (function_expander::add_input_operand): Handle CONST_INT
>>>       predicates.
>>>
>>>       gcc/testsuite/
>>>       * gcc.target/arm/mve/pr108443.c: Update predicate constant.
>>>       * gcc.target/arm/mve/pr108443-run.c: Likewise.
>>>       * gcc.target/arm/mve/pr114801.c: New test.
>>
>> Thanks, that looks much better.  OK, assuming no regressions.
>>
> 
> Indeed, thanks for your suggestions.
> 
> OK to backport to gcc-14  after a while?

Yes.

R.

Reply via email to