]> git.ipfire.org Git - thirdparty/gcc.git/commit
MATCH: [PR111002] Sink view_convert for vec_cond
authorAndrew Pinski <apinski@marvell.com>
Mon, 21 Aug 2023 00:22:27 +0000 (17:22 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 21 Aug 2023 07:45:38 +0000 (00:45 -0700)
commit47b833a9abe19d862a773d20dd6f961dcf811a11
tree07092290947f8e29541a2173447697f6494bd7cb
parentb9426543e8d3b9333d1561844472c3f568fa6913
MATCH: [PR111002] Sink view_convert for vec_cond

Like convert we can sink view_convert into vec_cond but
we can only do it if the element types are nop_conversions.
This is to allow conversion between signed and unsigned types only.
Rather than between integer and float types which mess up the vec_cond
so that isel does not understand `a?-1:0` is still that.

OK? Bootstrapped and tested on x86_64-linux-gnu and aarch64-linux-gnu.

PR tree-optimization/111002

gcc/ChangeLog:

* match.pd (view_convert(vec_cond(a,b,c))): New pattern.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve/cond_convert_8.c: New test.
gcc/match.pd
gcc/testsuite/gcc.target/aarch64/sve/cond_convert_8.c [new file with mode: 0644]