[all-commits] [llvm/llvm-project] 5b9899: [WebAssembly] Optimize convert_iKxN_u into convert...

Arseny Kapoulkine via All-commits all-commits at lists.llvm.org
Mon Jul 21 09:17:50 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b98992fb98cb9cd3c492907b262e149f84c0cb0
      https://github.com/llvm/llvm-project/commit/5b98992fb98cb9cd3c492907b262e149f84c0cb0
  Author: Arseny Kapoulkine <arseny.kapoulkine at gmail.com>
  Date:   2025-07-21 (Mon, 21 Jul 2025)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/test/CodeGen/WebAssembly/simd-conversions.ll
    M llvm/test/CodeGen/WebAssembly/simd-extending-convert.ll

  Log Message:
  -----------
  [WebAssembly] Optimize convert_iKxN_u into convert_iKxN_s (#149609)

convert_iKxN_s is canonicalized into convert_iKxN_u when the argument is
known to have sign bit 0. This results in emitting Wasm opcodes that, on
some targets (like x86_64), are dramatically slower than signed versions
on major engines.

Similarly to X86, we now fix this up in isel when the instruction has
nonneg flag from canonicalization or if we know the source has zero sign
bit.

Fixes #149457.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list