<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - vector truncation generates pretty terrible code without ssse3"
   href="http://llvm.org/bugs/show_bug.cgi?id=15524">bug 15524</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;">CC</td>
           <td>
                
           </td>
           <td>llvm-dev@redking.me.uk
           </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 - vector truncation generates pretty terrible code without ssse3"
   href="http://llvm.org/bugs/show_bug.cgi?id=15524#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - vector truncation generates pretty terrible code without ssse3"
   href="http://llvm.org/bugs/show_bug.cgi?id=15524">bug 15524</a>
              from <span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span></b>
        <pre>Fixed in ToT:

define i64 @trunc(<4 x i32> %inval) {
entry:
  %0 = trunc <4 x i32> %inval to <4 x i16>
  %1 = bitcast <4 x i16> %0 to i64
  ret i64 %1
}

generates
    pshuflw    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,2,2,3,4,5,6,7]
    pshufhw    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,1,2,3,4,6,6,7]
    pshufd    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,2,2,3]
    movd    %xmm0, %rax
    retq

define i64 @trunc(<8 x i16> %inval) {
entry:
  %0 = trunc <8 x i16> %inval to <8 x i8>
  %1 = bitcast <8 x i8> %0 to i64
  ret i64 %1
}

generates
    pand    LCPI1_0(%rip), %xmm0
    packuswb    %xmm0, %xmm0
    movd    %xmm0, %rax
    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>