[LLVMbugs] [Bug 22685] making zeros the hard way: scalar load into zero vector (AVX)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 2 13:56:39 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22685
Sanjay Patel <spatel+llvm at rotateright.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Sanjay Patel <spatel+llvm at rotateright.com> ---
http://reviews.llvm.org/rL233704
http://reviews.llvm.org/rL233724
http://reviews.llvm.org/rL233931
http://reviews.llvm.org/rL233941
After those, I think we can declare victory. The AVX2 codegen for the test
cases in comment 4 is ideal:
_mov_v8f32: ## @mov_v8f32
.cfi_startproc
## BB#0:
vmovss (%rdi), %xmm1 ## xmm1 = mem[0],zero,zero,zero
vaddps %ymm0, %ymm1, %ymm0
retq
.cfi_endproc
.globl _mov_v4f64
.align 4, 0x90
_mov_v4f64: ## @mov_v4f64
.cfi_startproc
## BB#0:
vmovsd (%rdi), %xmm1 ## xmm1 = mem[0],zero
vaddpd %ymm0, %ymm1, %ymm0
retq
.cfi_endproc
.globl _mov_v4i64
.align 4, 0x90
_mov_v4i64: ## @mov_v4i64
.cfi_startproc
## BB#0:
vmovq (%rdi), %xmm1 ## xmm1 = mem[0],zero
vpaddq %ymm0, %ymm1, %ymm0
retq
.cfi_endproc
.globl _mov_v8i32
.align 4, 0x90
_mov_v8i32: ## @mov_v8i32
.cfi_startproc
## BB#0:
vmovd (%rdi), %xmm1 ## xmm1 = mem[0],zero,zero,zero
vpaddd %ymm0, %ymm1, %ymm0
retq
.cfi_endproc
.globl _mov_v16i16
.align 4, 0x90
_mov_v16i16: ## @mov_v16i16
.cfi_startproc
## BB#0:
movzwl (%rdi), %eax
vmovd %eax, %xmm0
vpaddw %ymm0, %ymm1, %ymm0
retq
.cfi_endproc
.globl _mov_v32i8
.align 4, 0x90
_mov_v32i8: ## @mov_v32i8
.cfi_startproc
## BB#0:
movzbl (%rdi), %eax
vmovd %eax, %xmm1
vpaddb %ymm0, %ymm1, %ymm0
retq
-------------------------------------------------------------------------------
There's still something screwy with AVX1 and the integer cases, but this will
be a separate bug:
vmovd (%rdi), %xmm1 ## xmm1 = mem[0],zero,zero,zero
vpaddd %xmm0, %xmm1, %xmm1
vextractf128 $1, %ymm0, %xmm0
vinsertf128 $1, %xmm0, %ymm1, %ymm0
retq
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150402/c7c2c63f/attachment.html>
More information about the llvm-bugs
mailing list