https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128324
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Earnshaw <[email protected]>: https://gcc.gnu.org/g:499c78d0fc7c8ba993a165db70f0aba25d19698c commit r17-6457-g499c78d0fc7c8ba993a165db70f0aba25d19698c Author: Richard Earnshaw <[email protected]> Date: Thu Nov 5 16:16:00 2026 +0000 arm: more big-endian fixes for new vdup patterns [PR128324] Sashiko picked up a couple more issues with my recent vec-dup patterns, though I think one is possibly theoretical. The first is that if it could ever happen that a vector was a subreg, then we would hit an assertion error when looking to split a 64->128-bit vdup pattern because we check REGNO even though SUBREG is legal for the pattern. The split was always intended to run only after reload, once we are sure whether or not we're duplicating from a core register, so add that as a constraint on the splits. The second is another big-endian issue when splitting a 128->128-bit vdup when the 'low' part is wanted. In this case we would call gen_lowpart; but on big-endian this would return the wrong 64-bit part of the 128-bit register. The fix is to use simplify_gen_subreg instead matching the approach for the other 64-bit part. PR target/128324 gcc/ChangeLog: * config/arm/neon.md (neon_vdup_lane<VDQW:mode>_internal): Guard the split with reload_completed. (neon_vdup_lane<VHFBF:mode>_internal): Likewise. (neon_vdupq_lane<VQ2BF:mode>_internal): Use simplify_gen_subreg instead of gen_lowpart. gcc/testsuite/ChangeLog: * lib/target-supports.exp (arm arches): Add v7a_neon_hard. * gcc.target/arm/pr128324-2.c: New test. Assisted-by: Sashiko 0.8.0 (gemini/gemini-4-argon)
