https://gcc.gnu.org/g:0e45dd7038c2238712c73dc09df5c88224822a89
commit r17-5524-g0e45dd7038c2238712c73dc09df5c88224822a89 Author: Igor Shevlyakov <[email protected]> Date: Fri Oct 23 16:31:15 2026 -0700 testsuite: Check the FLOAT_EXPR sink only where float selects expand gcc.dg/tree-ssa/forwprop-vec-cond-float.c fails on arm with Neon. There vcond_mask for float vectors needs -funsafe-math-optimizations, so forwprop rightly does not sink the (v4sf) conversion of f into its VEC_COND_EXPR: that would replace a select the target can expand with one it cannot. Check f only for vect_float_strict targets, and keep the checks of g, the fix_trunc case, for all targets. Assisted-by: Claude Opus 5.5 gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/forwprop-vec-cond-float.c: Check the conversion in f only for vect_float_strict targets. Signed-off-by: Igor Shevlyakov <[email protected]> Diff: --- gcc/testsuite/gcc.dg/tree-ssa/forwprop-vec-cond-float.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-vec-cond-float.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-vec-cond-float.c index b4cabcd659f7..d04a05b701a9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-vec-cond-float.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-vec-cond-float.c @@ -35,6 +35,10 @@ __BB(2): return r_5; } -/* { dg-final { scan-tree-dump-not "= \\(v4s\[fi\]\\)" "forwprop1" } } */ -/* { dg-final { scan-tree-dump "<m_3, { 0\\.0, 0\\.0, 0\\.0, 0\\.0 }, { 1\\.0e\\+0, 1\\.0e\\+0, 1\\.0e\\+0, 1\\.0e\\+0 }>" "forwprop1" } } */ +/* The conversion in f is not sunk when the target can select between + int vectors but not between float vectors, as on arm without + -funsafe-math-optimizations. */ +/* { dg-final { scan-tree-dump-not "= \\(v4sf\\)" "forwprop1" { target vect_float_strict } } } */ +/* { dg-final { scan-tree-dump "<m_3, { 0\\.0, 0\\.0, 0\\.0, 0\\.0 }, { 1\\.0e\\+0, 1\\.0e\\+0, 1\\.0e\\+0, 1\\.0e\\+0 }>" "forwprop1" { target vect_float_strict } } } */ +/* { dg-final { scan-tree-dump-not "= \\(v4si\\)" "forwprop1" } } */ /* { dg-final { scan-tree-dump "<m_3, { 2, 2, 2, 2 }, { 3, 3, 3, 3 }>" "forwprop1" } } */
