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-14 16:34:36+00:00 Changes: 2 changed files, 29 additions, 1 deletions Head revision: karmea01/gcc-TEST ref km/neon-port-bugfixes commit 9bfc05c8a91f3f89d579afa3a79cce1c0da34184 Base revision: gcc/gcc-TEST ref trunk commit 929b1c42f3d23dcffacdedb005ab83d3607b47ce r17-2397-g929b1c42f3d23d Merge base: 929b1c42f3d23dcffacdedb005ab83d3607b47ce 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: acoplan 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)` with `types_compatible_p`, 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 * v3: Fix commit author email Changed files: - A: gcc/testsuite/gcc.target/aarch64/pr126064.c - M: gcc/config/aarch64/aarch64-neon-builtins-base.cc Karl Meakin (1): aarch64: Relax type-checking assert [PR126064] .../aarch64/aarch64-neon-builtins-base.cc | 2 +- gcc/testsuite/gcc.target/aarch64/pr126064.c | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/pr126064.c Range-diff against v3: 1: 8ceceb198e7e ! 1: 9bfc05c8a91f aarch64: fix pr126064 @@ Metadata Author: Karl Meakin <[email protected]> ## Commit message ## - aarch64: fix pr126064 + aarch64: Relax type-checking assert [PR126064] Comparing `arg_type` and `TREE_TYPE (b)` by pointer address causes an assertion failure when one type is a `typedef` for the other (eg @@ Commit message gcc/ChangeLog: + PR target/126064 * config/aarch64/aarch64-neon-builtins-base.cc: Compare `arg_type` and `TREE_TYPE (b)` using `types_compatible_p` rather than comparing their pointer addresses. gcc/testsuite/ChangeLog: + PR target/126064 * gcc.target/aarch64/pr126064.c: New test. ## gcc/config/aarch64/aarch64-neon-builtins-base.cc ## @@ gcc/config/aarch64/aarch64-neon-builtins-base.cc: public: ## gcc/testsuite/gcc.target/aarch64/pr126064.c (new) ## @@ ++/* { dg-options "-std=c99" } */ ++ +/* Check that `gimple_permute_pair::fold()` does not trip an assert when the LHS + type is `uint32x2_t` and the RHS type is `__Uint32x2_t`. */ + @@ gcc/testsuite/gcc.target/aarch64/pr126064.c (new) +uint32x2_t +minimized_repro (uint32x2_t a, uint32x2_t b) +{ -+ uint32x2x2_t c = vtrn_u32 (a, vrev64_u32 (b)); -+ return c.val[1]; ++ return vtrn_u32 (a, vrev64_u32 (b)).val[1]; +} -- 2.54.0
