On 07/06/2015 07:41 AM, Bill Schmidt wrote:
Hi,
Due to specifics of the POWER architecture, some forms of a vector
compare followed by a vector select are represented in RTL as a compare,
followed by a logical NOT, followed by the select. This tends to end up
generating an extra instruction. This patch adds a case to
simplify-rtx.c to remove the logical NOT by reversing the outcomes of
the select. I've added a POWER-specific test case that demonstrates
that the issue is fixed.
Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
regressions. Is this ok for trunk?
Thanks,
Bill
[gcc]
2015-07-06 Bill Schmidt <wschm...@linux.vnet.ibm.com>
* simplify-rtx.c (simplify_ternary_operation): Add simplification
for (!c) != {0,...,0} ? a : b for vector modes.
[gcc/testsuite]
2015-07-06 Bill Schmidt <wschm...@linux.vnet.ibm.com>
* gcc.target/powerpc/vec-cmp-sel.c: New test.
OK.
jeff