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

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 19:45:19 PDT 2021


tlively added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/simd-vector-trunc.ll:1
+; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+simd128 | FileCheck %s
+
----------------
jingbao wrote:
> tlively wrote:
> > If you change the run line to this, you can use utils/update_llc_test_checks.py to autogenerate the test output, which will make it easier for me to understand the transformation we are doing. Also, it looks like the code is more general than it needs to be to handle this one case. Is there an opportunity to either simplify the code or test more cases here?
> > the code is more general than it needs to be to handle this one case
> 
> I'm not sure I fully understand what you mean by this. Do you want me to change the function body of @trunc16i32_16i8? Is there detailed suggestions on how to change?
> 
> 
For example, `extractSubVector` and `truncateVectorWithNARROW` look like they are meant to work with many different vector types. If that's correct, it would be good to add tests for more vector types. Alternatively, if we only care about a smaller set of types, it would be nice if we could simplify the code and make it less general.


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