[PATCH] D134257: [WebAssembly] Improve codegen for loading scalars from memory to v128

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 11:18:03 PDT 2022


tlively added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/simd-offset.ll:1196-1199
+; CHECK-NEXT:    i32.const 24
+; CHECK-NEXT:    i32x4.shl
+; CHECK-NEXT:    i32.const 24
+; CHECK-NEXT:    i32x4.shr_s
----------------
It looks like there is some room for improvement here. These shifts aren't necessary, are they? It would be good to at least add a TODO about cleaning them up.


================
Comment at: llvm/test/CodeGen/WebAssembly/simd-offset.ll:1210
+; CHECK-NEXT:  # %bb.0:
+; CHECK-NEXT:    v128.const 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+; CHECK-NEXT:    local.get 0
----------------
Do you know why the zero vector is materialized here while the previous function uses a `local.get` to get an implicit zero vector?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134257/new/

https://reviews.llvm.org/D134257



More information about the llvm-commits mailing list