[PATCH] D109481: [WebAssembly] Custom optimization for truncate

Jing Bao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 19:54:51 PDT 2021


jingbao added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2532
+  // TODO: only v16i32 => v16i8 here. Can cover more.
+  if (!(InSVT == MVT::i32 && OutSVT == MVT::i8 && NumElems == 16))
+    return SDValue();
----------------
Hi Thomas, you're right that the code is meant to handle more types. My  initial purpose is to discuss the solution with you and Petr first so I keep the types simple and leaves a TODO here. If you're OK with the solution, I can try to cover more types and more tests.

(Actually I have little experience with LLVM types, it may take me some time to cover more, and any advice on the if conditions here is very welcome)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109481



More information about the llvm-commits mailing list