https://bugs.llvm.org/show_bug.cgi?id=41892

            Bug ID: 41892
           Summary: [X86][SSE] Failure to merge 2 x float stores to <2 x
                    float> store
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: llvm-...@redking.me.uk
                CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
                    llvm-...@redking.me.uk, spatel+l...@rotateright.com

https://godbolt.org/z/InfZZK

#include <x86intrin.h>

void sum_pairs_128(__m128 f, float *p) {
  p[0] = f[0] + f[1];
  p[1] = f[2] + f[3];
}


clang -O3 -march=btver2

_Z13sum_pairs_128Dv4_fPf: # @_Z13sum_pairs_128Dv4_fPf
  vhaddps %xmm0, %xmm0, %xmm0
  vmovss %xmm0, (%rdi)
  vextractps $1, %xmm0, 4(%rdi)
  retq

would be better if we managed to merge to:

_Z13sum_pairs_128Dv4_fPf: # @_Z13sum_pairs_128Dv4_fPf
  vhaddps %xmm0, %xmm0, %xmm0
  vmovsd %xmm0, (%rdi)
  retq

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to