From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 168123858D32; Sat, 3 Jun 2023 07:24:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 168123858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685777050; bh=Y4KEE460yyTcnBS30g3+sUfYFxd9a0SC+8J4JRlmJww=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vvPCAsiB2vYeMfInWniCyd4fK8ahjxKEBoZso35Z8rhXeOli8lFb5vKcPveJ/nrDu wgsrufHrgIRFabNTvgpvKDigp0Wdmv813bom8GUokylWODgWl6nP4kyA9FJS+KRsBD PYMVv0kPojYZsOLnfmbv0Scxd5LyJ+AOnt72GjeE= From: "klepikov.alex+bugs at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54089] [SH] Refactor shift patterns Date: Sat, 03 Jun 2023 07:24:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: klepikov.alex+bugs at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: olegendo at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54089 --- Comment #54 from Alexander Klepikov --- Regarding testsuite. There's execute fails, but this is due to lack of multilib. I'll rebuild and retest. There's also fail in pr64345-1.c, in this function: typedef signed char int8_t; int test_int8_t__shift_7_8 (int8_t* x) { return ((*x >> 7) ^ 1) & 1; } Clean GCC: .file "pr64345-1-test.c" .text .text .align 1 .align 2 .global _test_int8_t__shift_7_8 .type _test_int8_t__shift_7_8, @function _test_int8_t__shift_7_8: mov.l .L4,r1 sts.l pr,@-r15 jsr @r1 mov.b @r4,r4 mov r4,r0 tst #1,r0 movt r0 lds.l @r15+,pr rts nop .L5: .align 2 .L4: .long ___ashiftrt_r4_7 .size _test_int8_t__shift_7_8, .-_test_int8_t__shift_7_8 .ident "GCC: (GNU) 13.1.0" Patched GCC: .file "pr64345-1-test.c" .text .text .align 1 .align 2 .global _test_int8_t__shift_7_8 .type _test_int8_t__shift_7_8, @function _test_int8_t__shift_7_8: mov.b @r4,r1 sts.l pr,@-r15 cmp/pz r1 movt r0 lds.l @r15+,pr rts nop .size _test_int8_t__shift_7_8, .-_test_int8_t__shift_7_8 .ident "GCC: (GNU) 13.1.0" But it looks more like it's not a fail, but an optimization. But also there's tests that pass on patched but fail on clean. I'll take a closer look on them later after GCC and multilibs rebuild.=