[WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841)
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 13 May 2019 19:40:18 +0000 (19:40 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 13 May 2019 19:40:18 +0000 (19:40 +0000)
commit323dc634b984b7d30e10b82ae4e9536559488f70
tree2e4ee0efdcaba3f0b554747c6437a4cd0885a7ef
parentd9930d499a55c573de0ef4f7629fa6880dd7d65f
[WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841)

Usually this will abort fast-isel at the instruction using the
non-legal result, but if the only use is in a different basic block,
we'll incorrectly assume that the zext/sext is to i32 (rather than
i128 in this case).

Differential Revision: https://reviews.llvm.org/D61823

llvm-svn: 360616
llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
llvm/test/CodeGen/WebAssembly/PR41841.ll [new file with mode: 0644]