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

            Bug ID: 110040
           Summary: rs6000 port emits dead mfvsrd instruction for simple
                    test case
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeevitha at gcc dot gnu.org
  Target Milestone: ---

GCC Trunk generates a dead mfvsrd for the following test case.

[jeevitha@ltcden2-lp1 ~]$ cat bug.c 
#include <altivec.h>

void
foo (signed long *dst, vector signed __int128 src)
{
  *dst = (signed long) src[0];
}

[jeevitha@ltcden2-lp1 ~]$ gcc bug.c  -O2 -mcpu=power9 -S -o bug.s
[jeevitha@ltcden2-lp1 ~]$ cat bug.s
        .file   "bug.c"
        .machine power9
        .abiversion 2
        .section        ".text"
        .align 2
        .p2align 4,,15
        .globl foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        mfvsrd 11,34   #dead instruction
        mfvsrld 10,34
        std 10,0(3)
        blr

Reply via email to