public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/104387] New: aarch64: Redundant SXTH for “bag of bits” moves
@ 2022-02-04 18:14 rsandifo at gcc dot gnu.org
  2022-02-04 21:25 ` [Bug rtl-optimization/104387] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-02-04 18:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104387
           Summary: aarch64: Redundant SXTH for “bag of bits” moves
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

This PR is about another case in which we generate a redundant SXTH.
Specifically:

void f(short *x, short y)
{
  x[0] = y;
  x[1] = y;
}

generates:

        sxth    w1, w1
        strh    w1, [x0]
        strh    w1, [x0, 2]

even though the RTL makes it clear that the upper 16 bits of the
promoted “y” are unused.

This is related to PR64537, but I think it's worth keeping as a
separate PR since the fix isn't necessarily the same.

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

end of thread, other threads:[~2023-11-01 13:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 18:14 [Bug rtl-optimization/104387] New: aarch64: Redundant SXTH for “bag of bits” moves rsandifo at gcc dot gnu.org
2022-02-04 21:25 ` [Bug rtl-optimization/104387] " pinskia at gcc dot gnu.org
2023-10-31 22:07 ` pinskia at gcc dot gnu.org
2023-10-31 22:09 ` pinskia at gcc dot gnu.org
2023-11-01  6:30 ` lis8215 at gmail dot com
2023-11-01 13:56 ` law at gcc dot gnu.org

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).