[llvm] [WebAssembly] Add pattern for relaxed laneselect (from bitselect simd) (PR #163807)

Jasmine Tang via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 20 10:32:18 PDT 2025


================
@@ -1662,6 +1662,13 @@ multiclass SIMDLANESELECT<Vec vec, bits<32> op> {
                 (vec.vt V128:$a), (vec.vt V128:$b), (vec.vt V128:$c)))],
               vec.prefix#".relaxed_laneselect\t$dst, $a, $b, $c",
               vec.prefix#".relaxed_laneselect", op>;
+
+  let AddedComplexity = 1 in {
+    def : Pat<(vec.vt (int_wasm_bitselect
----------------
badumbatish wrote:

hmm i think there is already an intrinsics `int_wasm_relaxed_laneselect` for it at llvm/include/llvm/IR/IntrinsicsWebAssembly.td, but in this PR, i was hoping to convert the bitselect to the laneselect when the relaxed flag is present. Should I be doing something else here?

https://github.com/llvm/llvm-project/pull/163807


More information about the llvm-commits mailing list