<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:tlively@google.com" title="Thomas Lively <tlively@google.com>"> <span class="fn">Thomas Lively</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Fuse v128.load64_zero + iXX.widen_low into Load-and-Extend"
   href="https://bugs.llvm.org/show_bug.cgi?id=49210">bug 49210</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;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Fuse v128.load64_zero + iXX.widen_low into Load-and-Extend"
   href="https://bugs.llvm.org/show_bug.cgi?id=49210#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Fuse v128.load64_zero + iXX.widen_low into Load-and-Extend"
   href="https://bugs.llvm.org/show_bug.cgi?id=49210">bug 49210</a>
              from <span class="vcard"><a class="email" href="mailto:tlively@google.com" title="Thomas Lively <tlively@google.com>"> <span class="fn">Thomas Lively</span></a>
</span></b>
        <pre>This C file:

```
#include <smmintrin.h>

__m128i fused(__m128i* ptr) {
  return _mm_cvtepi16_epi32(_mm_loadl_epi64(ptr));
}
```

compiled with:

`emcc -msse4.1 -msimd128 fused.c -O2 -c -S -o -`

Produces this assembly, as expected:

```
fused:                                  # @fused
        .functype       fused (i32) -> (v128)
# %bb.0:                                # %entry
        local.get       0
        i32x4.load16x4_s        0:p2align=0
                                        # fallthrough-return
        end_function
```

Via this LLVM IR:

```
; ModuleID = '/usr/local/google/home/tlively/code/llvm-local/fused.c'
source_filename = "/usr/local/google/home/tlively/code/llvm-local/fused.c"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1"
target triple = "wasm32-unknown-emscripten"

; Function Attrs: nofree norecurse nosync nounwind readonly willreturn
mustprogress
define hidden <4 x i32> @fused(<4 x i32>* nocapture readonly %ptr)
local_unnamed_addr #0 {
entry:
  %0 = bitcast <4 x i32>* %ptr to <4 x i16>*
  %1 = load <4 x i16>, <4 x i16>* %0, align 1, !tbaa !2
  %conv.i.i.i = sext <4 x i16> %1 to <4 x i32>
  ret <4 x i32> %conv.i.i.i
}

attributes #0 = { nofree norecurse nosync nounwind readonly willreturn
mustprogress "frame-pointer"="none" "min-legal-vector-width"="128"
"no-trapping-math"="true" "stack-protector-buffer-size"="8"
"target-cpu"="generic" "target-features"="+simd128" }

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project">https://github.com/llvm/llvm-project</a>
9b0ddc2662addaa563b632c577996e515e1a7802)"}
!2 = !{!3, !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}
```</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>