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.
---
gcc/testsuite/gcc.target/arm/pr121773.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/arm/pr121773.c
diff --git a/gcc/testsuite/gcc.target/arm/pr121773.c
b/gcc/testsuite/gcc.target/arm/pr121773.c
new file mode 100644
index 00000000000..781cbd8ad5b
--- /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;
+}
--
2.43.0