Hi gcc-patches mailing list,
Richard Earnshaw <[email protected]> has requested that the following 
forgejo pull request
be published on the mailing list.

Created on: 2025-10-14 16:12:24+00:00
Latest update: 2025-10-14 16:17:40+00:00
Changes: 3 changed files, 22 additions, 3 deletions
Head revision: rearnsha/gcc-TEST ref hf-vsel-bug commit 
714c43c62453f444d295ad3424ad48070dedb265
Base revision: gcc/gcc-TEST ref trunk commit 
599d2902b0afd56485b56752a75b0f7a3b090c76 r16-4418-g599d2902b0afd5
Merge base: 599d2902b0afd56485b56752a75b0f7a3b090c76
Full diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/100.diff
Discussion:  https://forge.sourceware.org/gcc/gcc-TEST/pulls/100
Requested Reviewers:

When compiling for m-profile with the floating-point extension we have
a vsel instruction that takes a limited set of comparisons.  In most
cases we can use this with careful selection of the operand order, but
we need to expand things in the right way.  This patch is in two parts:

1) We validate that the expansion will produce correct RTL;
2) We canonicalize the comparison to increase the chances that the
above check will pass.

gcc:

        PR target/118460
        * config/arm/arm.cc (arm_canonicalize_comparison): For floating-
        point comparisons, swap the operand order if that will be more
        likely to produce a comparison that can be used with VSEL.
        (arm_validize_comparison): Make sure that HFmode comparisons
        are compatible with VSEL.

gcc/testsuite:

        PR target/118460
        * gcc.target/arm/armv8_2-fp16-move-1.c: Adjust expected output.
        * gcc.target/arm/armv8_2-fp16-move-2.c: Likewise.

Thanks for taking the time to contribute to GCC!

Please be advised that https://forge.sourceware.org/ is currently a trial
that is being used by the GCC community to experiment with a new workflow
based on pull requests.

Pull requests sent here may be forgotten or ignored. Patches that you want to
propose for inclusion in GCC should use the existing email-based workflow,
see https://gcc.gnu.org/contribute.html


Changed files:
- M: gcc/config/arm/arm.cc
- M: gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-1.c
- M: gcc/testsuite/gcc.target/arm/armv8_2-fp16-move-2.c


Richard Earnshaw (1):
  arm: avoid unmatched insn in movhfcc [PR118460]

 gcc/config/arm/arm.cc                         | 19 +++++++++++++++++++
 .../gcc.target/arm/armv8_2-fp16-move-1.c      |  4 ++--
 .../gcc.target/arm/armv8_2-fp16-move-2.c      |  2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)

-- 
2.50.1

Reply via email to