On 02/23/2017 04:04 AM, Toma Tabacu wrote:
Hi,

The ssa-thread-14.c test has been failing for MIPS for a while.

According to Patrick Palka, who modified this test's target selector in the fix
for PR71314, this test fails on targets which don't use non-short-circuit
logical ops and should be skipped for such targets.
In the case of MIPS, LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0, so the test
should be skipped for MIPS targets.

This patch adds the !logical_op_short_circuit requirement (defined in
testsuite/lib/target-supports.exp:7965) to ssa-thread-14.c's dg-options, which
will exclude MIPS targets. It also removes the "-mbranch-cost" options from
being passed to targets which will be skipped because of the newly added
!logical_op_short_circuit requirement.

This makes ssa-thread-14.c's target selector more similar the one from
ssa-thread-11.c (which was mentioned as a solution to PR71314 in the Bugzilla
thread).

Here are some links, for your convenience:
PR71314 on Bugzilla:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71314
The patch submission for fixing PR71314:
https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02359.html

Does this look OK ?
Is the !logical_op_short_circuit too heavy-handed here ?

Regards,
Toma Tabacu

gcc/testsuite/

        * gcc.dg/tree-ssa/ssa-thread-14.c (dg-options): Use
        logical_op_short_circuit to skip targets.
        (dg-additional-options): Don't pass -mbranch-cost=2 for MIPS, AVR
        and s390.
I don't think using !logical_op_short_circuit is too heavy handed here.

We get good coverage from the x86 target, so I don't mind losing coverage from avr/s390 as the target selector is a lot more likely to be correct after your change for the various targets now and in the future.

OK for the trunk.

Thanks,

jeff


Reply via email to