public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization /
@ 2023-09-25  5:16 cptarse-luke at yahoo dot com
  2023-09-25  6:43 ` [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth cptarse-luke at yahoo dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cptarse-luke at yahoo dot com @ 2023-09-25  5:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111581

            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=111500

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=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/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-libssp
--disable-libstdcxx-pch --disable-libstdc__-v3 --disable-nls --disable-shared
--disable-threads --disable-tls --disable-werror --enable-__cxa_atexit
--enable-c99 --enable-gnu-indirect-function --enable-interwork
--enable-languages=c,c++ --enable-long-long --enable-multilib --enable-plugins
--host= --libdir=/usr/lib --libexecdir=/usr/lib --prefix=/usr
--target=arm-none-eabi --with-gmp --with-gnu-as --with-gnu-ld
--with-headers=/usr/arm-none-eabi/include --with-host-libstdcxx='-static-libgcc
-Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-isl --with-libelf --with-mpc
--with-mpfr --with-multilib-list=rmprofile
--with-native-system-header-dir=/include --with-newlib
--with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/usr/arm-none-eabi
--with-system-zlib
Thread model: single
gcc version 9.3.0 (GCC) 
> arm-none-eabi-gcc -save-temps -S a.c -O3 -g -mcpu=cortex-m0plus -mthumb -Wall --specs=nosys.specs -nostdlib -fdata-sections -ffunction-sections -ffreestanding -Winline
> cat a.i
# 1 "a.c"
# 1 "/tmp//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.c"
void artiSXTH(volatile short * a) {
 short b = *a;
 *a = b;
}
> cat a.s
artiSXTH:
        ldrh    r3, [r0]
        sxth    r3, r3
        strh    r3, [r0]
        bx      lr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth
  2023-09-25  5:16 [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization / cptarse-luke at yahoo dot com
@ 2023-09-25  6:43 ` cptarse-luke at yahoo dot com
  2023-09-25  6:45 ` pinskia at gcc dot gnu.org
  2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cptarse-luke at yahoo dot com @ 2023-09-25  6:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111581

--- Comment #1 from Luke <cptarse-luke at yahoo dot com> ---
in the unsigned case:
furthermore the ldrh already cleared the high half-word,
so that a uxth would be superfluous,
even if there would be a subsequent str...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth
  2023-09-25  5:16 [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization / cptarse-luke at yahoo dot com
  2023-09-25  6:43 ` [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth cptarse-luke at yahoo dot com
@ 2023-09-25  6:45 ` pinskia at gcc dot gnu.org
  2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-25  6:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111581

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-09-25
     Ever confirmed|0                           |1
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=60749

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Is there a testcase without pointers to a volatile location?

If not then this is a dup of bug 60749.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth
  2023-09-25  5:16 [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization / cptarse-luke at yahoo dot com
  2023-09-25  6:43 ` [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth cptarse-luke at yahoo dot com
  2023-09-25  6:45 ` pinskia at gcc dot gnu.org
@ 2023-09-25  7:09 ` cptarse-luke at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cptarse-luke at yahoo dot com @ 2023-09-25  7:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111581

Luke <cptarse-luke at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Luke <cptarse-luke at yahoo dot com> ---
nope... i didn't know bug 60749... and it does not happen, when i omit the
"volatile"...

*** This bug has been marked as a duplicate of bug 60749 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-25  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25  5:16 [Bug target/111581] New: [arm-none-eabi-gcc] / suboptimal optimization / cptarse-luke at yahoo dot com
2023-09-25  6:43 ` [Bug target/111581] [arm-none-eabi-gcc] / suboptimal optimization / uxth/sxth cptarse-luke at yahoo dot com
2023-09-25  6:45 ` pinskia at gcc dot gnu.org
2023-09-25  7:09 ` cptarse-luke at yahoo dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).