]> granicus.if.org Git - llvm/commit
[WebAssembly] Convert stackified IMPLICIT_DEF into constant 0.
authorDan Gohman <dan433584@gmail.com>
Tue, 8 Nov 2016 19:40:38 +0000 (19:40 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 8 Nov 2016 19:40:38 +0000 (19:40 +0000)
commite5d85d174b1c2ada7a7253889599f918ce8e2504
tree4fcac67bac817c2c91139707521e688edc4bc252
parent9da8087b94575da0b19fa06822d6c95320728103
[WebAssembly] Convert stackified IMPLICIT_DEF into constant 0.

Since IMPLIFIT_DEF instructions are omitted in the output, when the output
of an IMPLICIT_DEF instruction is stackified, the resulting register lacks
an explicit push, leading to a push/pop mismatch. Fix this by converting
such IMPLICIT_DEFs into CONST_I32 0 instructions so that they have explicit
pushes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286274 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
test/CodeGen/WebAssembly/implicit-def.ll [new file with mode: 0644]