From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DBA293858C5F; Mon, 25 Sep 2023 05:16:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DBA293858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695618962; bh=e3NE7IcpYj2RtiiPtDOWCur7DxGV2fn4WZx1ctpjrkg=; h=From:To:Subject:Date:From; b=q4IGaOimmJUqpCLr3jcPeYQHBk48QjfVhB7NCr1xuqlLsu8U30NdFHM0JJJh3Jh/n /kDWeuBqcIqlYO8h5FBa8DmPvq4sX3UERtqX3q4yMqyugQ2TpSXNA2xpjixJ6Ymy6a t8MpMTkAbQy0FvdvsIe9l2yWSIOW8iLJ1/q52I5c= From: "cptarse-luke at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization / Date: Mon, 25 Sep 2023 05:16:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cptarse-luke at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111581 Bug ID: 111581 Summary: [arm-none-eabi-gcc] / suboptimal optimization / Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: cptarse-luke at yahoo dot com Target Milestone: --- it seems like, i should have filed this separately: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111500 i think the uxth/sxth is superfluous here, since nobody ever looks at the high half word... > arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=3Darm-none-eabi-gcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/arm-none-eabi/9.3.0/lto-wrapper Target: arm-none-eabi Configured with: ../configure --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libs= sp --disable-libstdcxx-pch --disable-libstdc__-v3 --disable-nls --disable-shar= ed --disable-threads --disable-tls --disable-werror --enable-__cxa_atexit --enable-c99 --enable-gnu-indirect-function --enable-interwork --enable-languages=3Dc,c++ --enable-long-long --enable-multilib --enable-pl= ugins --host=3D --libdir=3D/usr/lib --libexecdir=3D/usr/lib --prefix=3D/usr --target=3Darm-none-eabi --with-gmp --with-gnu-as --with-gnu-ld --with-headers=3D/usr/arm-none-eabi/include --with-host-libstdcxx=3D'-stati= c-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-isl --with-libelf --with-mpc --with-mpfr --with-multilib-list=3Drmprofile --with-native-system-header-dir=3D/include --with-newlib --with-python-dir=3Dshare/gcc-arm-none-eabi --with-sysroot=3D/usr/arm-none-= eabi --with-system-zlib Thread model: single gcc version 9.3.0 (GCC)=20 > arm-none-eabi-gcc -save-temps -S a.c -O3 -g -mcpu=3Dcortex-m0plus -mthumb= -Wall --specs=3Dnosys.specs -nostdlib -fdata-sections -ffunction-sections = -ffreestanding -Winline > cat a.i # 1 "a.c" # 1 "/tmp//" # 1 "" # 1 "" # 1 "a.c" void artiSXTH(volatile short * a) { short b =3D *a; *a =3D b; } > cat a.s artiSXTH: ldrh r3, [r0] sxth r3, r3 strh r3, [r0] bx lr=