<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - making zeros the hard way: scalar load into zero vector (AVX)"
   href="https://llvm.org/bugs/show_bug.cgi?id=22685">bug 22685</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - making zeros the hard way: scalar load into zero vector (AVX)"
   href="https://llvm.org/bugs/show_bug.cgi?id=22685#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - making zeros the hard way: scalar load into zero vector (AVX)"
   href="https://llvm.org/bugs/show_bug.cgi?id=22685">bug 22685</a>
              from <span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span></b>
        <pre><a href="http://reviews.llvm.org/rL233704">http://reviews.llvm.org/rL233704</a>
<a href="http://reviews.llvm.org/rL233724">http://reviews.llvm.org/rL233724</a>
<a href="http://reviews.llvm.org/rL233931">http://reviews.llvm.org/rL233931</a>
<a href="http://reviews.llvm.org/rL233941">http://reviews.llvm.org/rL233941</a>

After those, I think we can declare victory. The AVX2 codegen for the test
cases in <a href="show_bug.cgi?id=22685#c4">comment 4</a> 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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>