]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Remove sve/pre_cond_share_1.c [PR115248]
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 13 Mar 2025 12:03:04 +0000 (12:03 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 13 Mar 2025 12:03:04 +0000 (12:03 +0000)
commita68e32b8e4b4c03c81e3a4b7560d52fef2d16088
tree3344123e7c43cd849a8a7479711d9e10912ef7ff
parent22847ef193670e761ed205a4a6f0a694b939d4e4
testsuite: Remove sve/pre_cond_share_1.c [PR115248]

gcc.target/aarch64/sve/pre_cond_share_1.c started failing after
r15-276-gbed6ec161be8c5ca.  However, that was incidental.
The test's inner loop is duplicated by -fswitch-loops and
that patch happened to change the copy of the loop that was
not the original focus of the test.

The test was added as part of r14-4713-g4b39aeef594f311e (patch A).
Before patch A we had:

  mask__109.48_201 = vect_distbb_170.43_191 < vect_cst__200;
  _263 = .COND_MUL (mask__109.48_201, vect_iftmp.45_195, vect_cst__198, { 0.0, ... });
  vect_prephitmp_153.50_205 = .VCOND (vect_distbb_170.43_191, { 0.0, ... }, _263, vect_cst__198, 112);

which, expanding the .VCOND, is equivalent to:

  mask__102.46_197 = vect_distbb_170.43_191 >= { 0.0, ... };
  mask__109.48_201 = vect_distbb_170.43_191 < vect_cst__200;
  _263 = .COND_MUL (mask__109.48_201, vect_iftmp.45_195, vect_cst__198, { 0.0, ... });
  vect_prephitmp_153.50_205 = mask__102.46_197 ? _263 : vect_cst__198

After patch A we had:

  mask__102.46_197 = vect_distbb_170.43_191 >= { 0.0, ... };
  mask__109.48_201 = vect_distbb_170.43_191 < vect_cst__200;
  _70 = mask__102.46_197 & mask__109.48_201;
  vect_prephitmp_153.50_205 = .COND_MUL (_70, vect_iftmp.45_195, vect_cst__198, { 0.0, ... });

But this changes the behaviour when vect_distbb_170.43_191 < { 0.0, ... }.
In that case, the original code would pick an else value of vect_cst__198,
whereas the new code would pick an else value of { 0.0, ... }.

That was fixed in r14-8668-g8123f3ca3fd89103 (PR113607, patch B),
but fixing the bug (rightly) reverted the code to the previous output.
Patch B therefore XFAILed the thing that patch A was originally testing.

Since the test was added for patch A and since patch A seems to generate
incorrect code for the test, I think we should just remove it.

gcc/testsuite/
PR testsuite/115248
* gcc.target/aarch64/sve/pre_cond_share_1.c: Delete
gcc/testsuite/gcc.target/aarch64/sve/pre_cond_share_1.c [deleted file]