[llvm] [WebAssembly] Constant fold wasm.dot (PR #149619)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 08:39:36 PDT 2025


================
@@ -3826,6 +3827,37 @@ static Constant *ConstantFoldFixedVectorCall(
     }
     return ConstantVector::get(Result);
   }
+  case Intrinsic::wasm_dot: {
+    unsigned NumElements =
+        cast<FixedVectorType>(Operands[0]->getType())->getNumElements();
+
+    assert(NumElements == 8 && Result.size() == 4 &&
+           "wasm dot takes i16x8 and produces i32x4");
----------------
lukel97 wrote:

Oh woops, ignore the whitespace sorry, it was just about the underescore in wasm_dot

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


More information about the llvm-commits mailing list