From: Richard Earnshaw Date: Wed, 7 Jan 2026 15:46:40 +0000 (+0000) Subject: arm: add test for recent combine fix [PR121773] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fadfce9956a2cd2f73f07dee8e5e97c8af78ae75;p=thirdparty%2Fgcc.git 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 --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 + +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; +}