[WebAssembly] Select call_indirect for alloca calls
authorHeejin Ahn <aheejin@gmail.com>
Tue, 28 Mar 2023 08:01:21 +0000 (01:01 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 29 Mar 2023 19:46:58 +0000 (12:46 -0700)
commitd91c9aef9b37924b2188b88fc1091f0926e6158d
tree9855fa301973e7ae593c336bac5b6ea52489175a
parent3e3594c771e65b48ceeb89a7186d5e3b119ec3b9
[WebAssembly] Select call_indirect for alloca calls

Currently calling stack locations is selected using `CALL` in ISel,
resulting in an invalid code and crashing in AsmPrinter. FastISel
correctly selects it will `CALL_INDIRECT`.

Fixes the problem reported in D146781.

Reviewed By: tlively, HerrCai0907

Differential Revision: https://reviews.llvm.org/D147033
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/call-indirect.ll