This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Fix PR63266: Keep track of impact of sign extension in bswap
- From: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- To: "'Christophe Lyon'" <christophe dot lyon at linaro dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Oct 2014 12:06:25 -0000
- Subject: RE: [PATCH] Fix PR63266: Keep track of impact of sign extension in bswap
- Authentication-results: sourceware.org; auth=none
- References: <000001cfd198$71470e30$53d52a90$ at arm dot com> <CAFiYyc12bCCxtunYgib+kPvY7-R=ygiw0sBY-bPz=V7NkqPRyQ at mail dot gmail dot com> <000601cfed11$6702fdf0$3508f9d0$ at arm dot com> <CAKdteObxtNKVc-3H_3LRLCOZxKz0buNWfioC8SpTaUYxmA93NQ at mail dot gmail dot com> <000701cfedd6$1754ee60$45fecb20$ at arm dot com> <CAKdteOYJgsqtZ06UkmDFp=APJBBo3PdHpB4+0Fr_Bm7qKXOiCQ at mail dot gmail dot com>
> From: Christophe Lyon [mailto:christophe.lyon@linaro.org]
> Sent: Sunday, October 26, 2014 4:40 PM
> I tried to modify check_effective_target_bswap
> and added:
> + } else {
> + if { [istarget arm*-*-*]
> + && [check_no_compiler_messages_nocache arm_v6_or_later
> object {
> + #if __ARM_ARCH < 6
> + #error not armv6 or later
> + #endif
> + int i;
> + } ""] } {
> + set et_bswap_saved 1
> + }
> since the rev* instructions appeared in v6.
>
> Regarding the testsuite, it moves the tests to UNSUPPORTED vs a mix of
> PASS/FAIL/XFAIL
[SNIP PASS/FAIL/XFAIL changes]
>
> The PASS seems not very informative, so it may not be a problem to
> loose these few PASS/XFAIL.
Agreed. A FAIL would only mean that the test was badly written. Only
the dump is relevant to tell whether the bswap pass did its job or not.
>
> We can also explicitly skip optimize-bswaphi-1 when ARM_ARCH < 6.
>
> Not sure what's preferred?
I prefer changing the effective target as it could be reused for some other tests
eventually. It also reflects better the reason why the test is disabled: no 16-bit
bswap.
Best regards,
Thomas