[all-commits] [llvm/llvm-project] b13bca: [WebAssembly] Unstackify registers with no uses in...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Tue Jul 22 15:34:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b13bca7387a7aad6eaf3fa1c55bd06fe091f65ed
      https://github.com/llvm/llvm-project/commit/b13bca7387a7aad6eaf3fa1c55bd06fe091f65ed
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2025-07-22 (Tue, 22 Jul 2025)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
    A llvm/test/CodeGen/WebAssembly/removed-terminator.ll

  Log Message:
  -----------
  [WebAssembly] Unstackify registers with no uses in ExplicitLocals (#149626)

There are cases we end up removing some intructions that use stackified
registers after RegStackify. For example,

```wasm
bb.0:
  %0 = ...    ;; %0 is stackified
  br_if %bb.1, %0
bb.1:
```

In this code, br_if will be removed in CFGSort, so we should unstackify
%0 so that it can be correctly dropped in ExplicitLocals.

Rather than handling this in case-by-case basis, this PR just
unstackifies all stackifies register with no uses in the beginning of
ExplicitLocals, so that they can be correctly dropped.

Fixes #149097.



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