<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [X86][AVX] Broadcast loads don't respect dependencies"
   href="https://llvm.org/bugs/show_bug.cgi?id=30596">30596</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86][AVX] Broadcast loads don't respect dependencies
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As detailed in <a href="https://reviews.llvm.org/D25039">https://reviews.llvm.org/D25039</a>:

declare void @gfunc(<4 x float>*)
declare void @llvm.lifetime.start(i64, i8*)
declare void @llvm.lifetime.end(i64, i8*)

define float @broadcast_lifetime() nounwind {
  %1 = alloca <4 x float>, align 16
  %2 = alloca <4 x float>, align 16
  %3 = bitcast <4 x float>* %1 to i8*
  %4 = bitcast <4 x float>* %2 to i8*

  call void @llvm.lifetime.start(i64 16, i8* %3)
  call void @gfunc(<4 x float>* %1)
  %5 = load <4 x float>, <4 x float>* %1, align 16
  call void @llvm.lifetime.end(i64 16, i8* %3)

  call void @llvm.lifetime.start(i64 16, i8* %4)
  call void @gfunc(<4 x float>* %2)
  %6 = load <4 x float>, <4 x float>* %2, align 16
  call void @llvm.lifetime.end(i64 16, i8* %4)

  %7 = extractelement <4 x float> %5, i32 1
  %8 = extractelement <4 x float> %6, i32 1
  %9 = fsub float %8, %7
  ret float %9
}

broadcast_lifetime:
  subq    $24, %rsp
  movq    %rsp, %rdi
  callq   gfunc
  movq    %rsp, %rdi
  callq   gfunc
  vbroadcastss    4(%rsp), %xmm0 ## <-- 1st gfunc result
  vbroadcastss    4(%rsp), %xmm1 ## <-- 2nd gfunc result
  vsubss  %xmm0, %xmm1, %xmm0
  addq    $24, %rsp
  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>