https://gcc.gnu.org/g:11c6d8cc9e5924c3a70e9289d1be2c2885b1dc6d
commit r15-8031-g11c6d8cc9e5924c3a70e9289d1be2c2885b1dc6d Author: Richard Sandiford <richard.sandif...@arm.com> Date: Thu Mar 13 13:23:28 2025 +0000 testsuite: Add -fno-tree-sink to sve/pr96357.c gcc.target/aarch64/sve/pr96357.c started failing after r15-518-g99b1daae18c095d6, which tweaked the heuristics about when to sink code. The testcase has: double i = d, j = 1.0 - f, k = j ? d : j; if (k == 1.0) i = 0.0; *l = *n = *g = *h = i * 0.5; where k == 1.0 is false if j is zero (since k is then also 0). So we end up with a diamond whose condition is j != 0 && d == 1. The else branch of the diamond is the only one that uses the result of i = d, so after the patch, we sink the conversion to there. And that seems like a reasonable thing to do. However, aarch64 doesn't yet allow int->double conversions to be predicated, so ifcvt cannot handle the sunk form, meaning that we can no longer vectorise. The testcase is highly artificial and so shouldn't IMO be used to tune the sinking heuristics. Instead I think we should just disable sinking for the test. An alternative would be to add -ffast-math, but I think that would interfere more with the original intent. gcc/testsuite/ * gcc.target/aarch64/sve/pr96357.c: Add -fno-tree-sink. Diff: --- gcc/testsuite/gcc.target/aarch64/sve/pr96357.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c b/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c index 5d8fd8b53c3d..9a7f912e529f 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -O3 -march=armv8.2-a+sve" } */ +/* { dg-options "-fpermissive -O3 -march=armv8.2-a+sve -fno-tree-sink" } */ int d;