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

            Bug ID: 113325
           Summary: unnecessary byte swap for memory clear
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guihaoc at gcc dot gnu.org
  Target Milestone: ---

//test case

void* foo (void* s1)
{
  return __builtin_memset (s1, 0, 32);
}

//assembly
        vspltisw 0,0
        li 10,16
        xxpermdi 0,32,32,2
        stxvd2x 0,0,3
        stxvd2x 0,3,10
        blr

The xxpermdi is unnecessary. The problem occurs on P8 LE.

Reply via email to