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

            Bug ID: 111384
           Summary: missed optimization: GCC adds extra any extend when
                    storing subreg#0 multiple times
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lis8215 at gmail dot com
  Target Milestone: ---

Simple example:

void store_hi_twice(uint32_t src, uint16_t *dst1, uint16_t *dst2)
{
    *dst1 = src;
    *dst2 = src;
}

shows that GCC can't opt out unnecessary zero extend of the src's low half
aimed to store two or more times. Many targets are affected, although x86-64
don't.

Reply via email to