[PATCH] D89366: [WebAssembly] v128.load{8, 16, 32, 64}_lane instructions
Thomas Lively via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 18:22:28 PDT 2020
tlively added inline comments.
================
Comment at: clang/include/clang/Basic/BuiltinsWebAssembly.def:180
+TARGET_BUILTIN(__builtin_wasm_load32_lane, "V4iIii*", "nU", "simd128")
+TARGET_BUILTIN(__builtin_wasm_load64_lane, "V2LLiIiLLi*", "nU", "simd128")
+TARGET_BUILTIN(__builtin_wasm_store8_lane, "vV16ScIiSc*", "n", "simd128")
----------------
aheejin wrote:
> tlively wrote:
> > aheejin wrote:
> > > `U` in the third argument [[ https://github.com/llvm/llvm-project/blob/72732acade77d5ee55a818e2da77a2c5b7033ccb/clang/include/clang/Basic/Builtins.def#L75 | means ]] pure. Can we say loads are pure? (The same for existing `__builtin_wasm_load32_zero` and `__builtin_wasm_load64_zero`)
> > Yes, this is the difference between "pure" and "const."
> >
> > https://github.com/llvm/llvm-project/blob/master/clang/include/clang/Basic/Builtins.h#L97-L106
> Can't SIMD loads trap? (Normal loads can AFAIK, right?)
Hmm yes, good point. I suppose that counts as a side effect so neither these nor the load_zero builtins should be pure?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89366/new/
https://reviews.llvm.org/D89366
More information about the cfe-commits
mailing list