<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - [SIMD] Creating a vector from dereferenced pointer and zeros should use v128.load32/64_zero"
href="https://bugs.llvm.org/show_bug.cgi?id=50799">50799</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SIMD] Creating a vector from dereferenced pointer and zeros should use v128.load32/64_zero
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>clang@evan.coeusgroup.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Currently the compiler will generate a scalar load and a vector replace_lane.
Example (Compiler Explorer: <a href="https://godbolt.org/z/bfv3nY6ro">https://godbolt.org/z/bfv3nY6ro</a>):
#include <stdint.h>
#pragma clang diagnostic ignored "-Wmissing-prototypes"
typedef int32_t i32x4 __attribute__((__vector_size__(16)));
typedef int64_t i64x2 __attribute__((__vector_size__(16)));
i32x4
load32_zero(const int32_t * a) {
return (i32x4) { *a, 0, 0, 0 };
}
i64x2
load64_zero(const int64_t * a) {
return (i64x2) { *a, 0 };
}
i32x4
load32_zero_intrin(const int32_t * a) {
return __builtin_wasm_load32_zero(a);
}
i64x2
load64_zero_intrin(const int64_t * a) {
return __builtin_wasm_load64_zero(a);
}</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>