[PATCH] D105950: [WebAssembly] Codegen for v128.loadX_lane instructions
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 01:39:54 PDT 2021
aheejin added inline comments.
================
Comment at: clang/lib/Headers/wasm_simd128.h:174
+static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_load8_lane(
+ const void *__ptr, v128_t __vec, int __i) __REQUIRE_CONSTANT(__i) {
+ struct __wasm_v128_load8_lane_struct {
----------------
Nit: Other similar functions in this file seem to be using `__mem` instead of `__ptr`? (Currently only builtins are using `__ptr`)
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td:324
+ PatFrag<(ops node:$ptr, node:$vec, node:$idx),
+ (vector_insert $vec, (i32 (extloadi8 $ptr)), $idx)>;
+def load16_lane :
----------------
Why are i8 and i16 are extended-loaded?
================
Comment at: llvm/test/CodeGen/WebAssembly/simd-build-vector.ll:7
-target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
----------------
This seems already contained in D105842? The same for the other files.
================
Comment at: llvm/test/CodeGen/WebAssembly/simd-build-vector.ll:214
; CHECK: v128.const $push[[L0:[0-9]+]]=, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0
-; CHECK: i8x16.replace_lane
+; CHECK: v128.load8_lane
; CHECK: i8x16.replace_lane
----------------
Why the change?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105950/new/
https://reviews.llvm.org/D105950
More information about the llvm-commits
mailing list