[PATCH] D88591: [WebAssembly] Emulate v128.const efficiently

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 09:31:50 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1594
+    unsigned I = 0;
+    size_t ByteStep = VecT.getScalarSizeInBits() / 8;
+    for (const SDValue &Lane : Op->op_values()) {
----------------
More comments or assertions about the expected range for ByteStep could be helpful.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1595
+    size_t ByteStep = VecT.getScalarSizeInBits() / 8;
+    for (const SDValue &Lane : Op->op_values()) {
+      if (IsConstant(Lane)) {
----------------
More comments of assertions about the expected number of loop iterations and the relationship to ByteStep could be helpful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88591



More information about the llvm-commits mailing list