<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98502>98502</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
WebAssembly: simd128 feature is required even when the relaxed-simd feature is enabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alexcrichton
</td>
</tr>
</table>
<pre>
Given this input:
```llvm
target triple = "wasm32-unknown-wasi"
declare <2 x i64> @llvm.wasm.relaxed.laneselect.v2i64(<2 x i64>, <2 x i64>, <2 x i64>)
define <2 x i64> @test(<2 x i64>, <2 x i64>, <2 x i64>) #0 {
start:
%_4 = tail call <2 x i64> @llvm.wasm.relaxed.laneselect.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) #3
ret <2 x i64> %_4
}
attributes #0 = { "target-features"="+relaxed-simd" }
```
this currently crashes with:
```
$ llc foo.ll -filetype=obj -o foo.o
LLVM ERROR: Attempting to emit LOCAL_GET_V128 instruction but the Feature_HasSIMD128 predicate(s) are not met
```
This works if `+simd128` is added but given [this](https://github.com/llvm/llvm-project/blob/fb5a38bb4930736b0aab3ce428b60245921f982f/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h#L107) it seems like this might be intended to work as-is instead of requiring an explicit enabling of the `+simd128` feature.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVEFv4zYT_TX0ZWCDGkq2dNDBjuP9PiCLBbLB9hiQ0sjihpJcchQn_76g5CAOsm3RooAhg8PhI9-bN6NDsMeeqBTZTmT7hR65HXypHb1U3lYtD_3CDPVr-cU-Uw_c2gC2P40s1FbIvZBv37Wcf849d3OItT8SA3t7cgRC7UEgnnXoFC7H_qkfzv3yrIMViNdINVVO-3jgBuEF7DoV6hZEOiGv4vmVJ6dfqF453VMgRxWvnjEmYv7hlMAb-LtA8fHuxva_uJop8L8CB4FKgtjsZ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