https://bugs.llvm.org/show_bug.cgi?id=42607
Bug ID: 42607
Summary: Missed opportunity for vpadd
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
typedef unsigned long long v64u64 __attribute__((vector_size(64)));
typedef unsigned __int128 v64u128 __attribute__((vector_size(64)));
v64u64 foo(v64u64 a, v64u128 b) { return a + (v64u64)b; }
-O3 -mavx512vbmi -march=skylake
Clang:
foo: # @foo
vmovq xmm1, rcx
vmovq xmm2, rdx
vpunpcklqdq xmm1, xmm2, xmm1 # xmm1 = xmm2[0],xmm1[0]
vmovq xmm2, rsi
vmovq xmm3, rdi
vpunpcklqdq xmm2, xmm3, xmm2 # xmm2 = xmm3[0],xmm2[0]
vinserti128 ymm1, ymm2, xmm1, 1
vmovq xmm2, r9
vmovq xmm3, r8
vpunpcklqdq xmm2, xmm3, xmm2 # xmm2 = xmm3[0],xmm2[0]
vinserti128 ymm2, ymm2, xmmword ptr [rsp + 8], 1
vinserti64x4 zmm1, zmm1, ymm2, 1
vpaddq zmm0, zmm1, zmm0
ret
GCC:
foo:
vpaddq zmm0, zmm0, ZMMWORD PTR [rsp+8]
ret
--
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