]> git.ipfire.org Git - thirdparty/gcc.git/commit
Extend vect_recog_cond_expr_convert_pattern to handle REAL_CST
authorliuhongt <hongtao.liu@intel.com>
Mon, 12 May 2025 06:21:30 +0000 (23:21 -0700)
committerliuhongt <hongtao.liu@intel.com>
Tue, 20 May 2025 01:54:57 +0000 (18:54 -0700)
commit1e579e2eb5bf69419222a10afc854565b6bc0d78
tree6eb762f08a6e9fab775370736d03caebf092d11f
parentdd8ee1df28e0a26b666d64a6098a121fd22aa90d
Extend vect_recog_cond_expr_convert_pattern to handle REAL_CST

REAL_CST is handled if it can be represented in different floating
point types without loss of precision or under fast math.

gcc/ChangeLog:

PR tree-optimization/103771
* match.pd (cond_expr_convert_p): Extend the match to handle
REAL_CST.
* tree-vect-patterns.cc
(vect_recog_cond_expr_convert_pattern): Handle REAL_CST.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr103771-5.c: New test.
* gcc.target/i386/pr103771-6.c: New test.
gcc/match.pd
gcc/testsuite/gcc.target/i386/pr103771-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr103771-6.c [new file with mode: 0644]
gcc/tree-vect-patterns.cc