[WebAssembly] Fix ISel crash on sext_inreg/extract type mismatch
authorThomas Lively <tlively@google.com>
Tue, 4 Jun 2019 21:08:20 +0000 (21:08 +0000)
committerThomas Lively <tlively@google.com>
Tue, 4 Jun 2019 21:08:20 +0000 (21:08 +0000)
commit3d9ca00e74e26f616de95353dd855b65ae5cf06f
tree643183fdc944e50438cd703b46cce27eb6d9baac
parent6b432dca5d4aa6bea8a39e7858f8cfd19f2b87ed
[WebAssembly] Fix ISel crash on sext_inreg/extract type mismatch

Summary:
Adjusts the index and adds a bitcast around the vector operand of
EXTRACT_VECTOR_ELT so that its lane type matches the source type of
its parent sext_inreg. Without this bitcast the ISel patterns do not
match and ISel fails.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 362547
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/simd-extended-extract.ll [new file with mode: 0644]