https://gcc.gnu.org/g:fadfce9956a2cd2f73f07dee8e5e97c8af78ae75

commit r16-6560-gfadfce9956a2cd2f73f07dee8e5e97c8af78ae75
Author: Richard Earnshaw <[email protected]>
Date:   Wed Jan 7 15:46:40 2026 +0000

    arm: add test for recent combine fix [PR121773]
    
    This adds and arm-specific executable test for the recent fix for PR
    rtl-optimization/121773 based on the failing code in the original PR.
    
    gcc/testsuite/ChangeLog:
    
            PR rtl-optimization/121773
            * gcc.target/arm/pr121773.c: New test.

Diff:
---
 gcc/testsuite/gcc.target/arm/pr121773.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gcc/testsuite/gcc.target/arm/pr121773.c 
b/gcc/testsuite/gcc.target/arm/pr121773.c
new file mode 100644
index 000000000000..781cbd8ad5bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr121773.c
@@ -0,0 +1,19 @@
+/* { dg-do "run" } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint64x1_t __attribute__((noinline,noclone)) foo() {
+  uint64x2_t v36 = vdupq_n_u64(0x2020000012345678);
+  uint64x1_t v48 = vget_low_u64(v36);
+  uint64x1_t v50 = vadd_u64(v48, v48);
+  return vpadal_u32(v50, vdup_n_u32(0));
+}
+
+int main() {
+  if (vget_lane_u64 (foo(), 0) != 0x404000002468acf0)
+    __builtin_abort ();
+  return 0;
+}

Reply via email to