Hi gcc-patches mailing list,
Karl Meakin via Sourceware Forge 
<[email protected]> has requested that the 
following forgejo pull request
be published on the mailing list.

Created on: 2026-07-01 12:55:50+00:00
Latest update: 2026-07-01 13:48:24+00:00
Changes: 2 changed files, 28 additions, 1 deletions
Head revision: karmea01/gcc-TEST ref km/neon-port-bugfixes commit 
9cee9079588d1c6604c710a0858b071e14b9d0c6
Base revision: gcc/gcc-TEST ref trunk commit 
44e33b2d621d6d5e5fd635ad2595bbf99cd80521 r17-2056-g44e33b2d621d6d
Merge base: 44e33b2d621d6d5e5fd635ad2595bbf99cd80521
Full diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/183.diff
Discussion:  https://forge.sourceware.org/gcc/gcc-TEST/pulls/183
Requested Reviewers:

Comparing `arg_type` and `TREE_TYPE (b)` by pointer address causes an
assertion failure when one type is a `typedef` for the other (eg
`uint32x2_t` and `__Uint32x2_t`. Fix by using a more relaxed comparison.

gcc/ChangeLog:

        * config/aarch64/aarch64-neon-builtins-base.cc: Compare
        `arg_type` and `TREE_TYPE (b)` by comparing their mode and
        unsigned-ness, rather than their pointer address.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/pr126064.c: New test.

ChangeLog:
* v1: Initial revision
* v2: Use `types_compatible_p` rather than comparing types mods and signedness


Changed files:
- A: gcc/testsuite/gcc.target/aarch64/pr126064.c
- M: gcc/config/aarch64/aarch64-neon-builtins-base.cc


Karl Meakin (1):
  aarch64: fix pr126064

 .../aarch64/aarch64-neon-builtins-base.cc     |  2 +-
 gcc/testsuite/gcc.target/aarch64/pr126064.c   | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/gcc.target/aarch64/pr126064.c

Range-diff against v1:
1:  725b7529a237 ! 1:  9cee9079588d aarch64: fix pr126064
    @@ Commit message
         gcc/ChangeLog:
     
                 * config/aarch64/aarch64-neon-builtins-base.cc: Compare
    -            `arg_type` and `TREE_TYPE (b)` by comparing their mode and
    -            unsigned-ness, rather than their pointer address.
    +            `arg_type` and `TREE_TYPE (b)` using `types_compatible_p` 
rather
    +            than comparing their pointer addresses.
     
         gcc/testsuite/ChangeLog:
     
    @@ gcc/config/aarch64/aarch64-neon-builtins-base.cc: public:
      
          auto arg_type = TREE_TYPE (a);
     -    gcc_assert (arg_type == TREE_TYPE (b));
    -+    gcc_assert (TYPE_MODE (arg_type) == TYPE_MODE (TREE_TYPE (b))
    -+          && TYPE_UNSIGNED (arg_type) == TYPE_UNSIGNED (TREE_TYPE (b)));
    ++    gcc_assert (types_compatible_p (arg_type, TREE_TYPE (b)));
      
          auto tuple_type = TREE_TYPE (f.lhs);
          auto tuple = create_tmp_var (tuple_type);
-- 
2.54.0

Reply via email to