[WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants
authorThomas Lively <tlively@google.com>
Wed, 25 Aug 2021 00:24:03 +0000 (17:24 -0700)
committerThomas Lively <tlively@google.com>
Wed, 25 Aug 2021 00:24:03 +0000 (17:24 -0700)
commitca541aa319cd927c117235053712a808886828f0
tree423471d45c91e25bdb228a6d1e8ba79f4e2efef3
parent2d743af4e98211cc232902c8691ec988cf838d9e
[WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants

Fixes PR51605 in which a DAG combine and legalization sequence generated
out-of-range constants in BUILD_VECTOR lanes. In the v16i8 case, the constants
were 255, which would be in range if DAG ISel used unsigned constants, but it is
out of range because DAG ISel uses signed constants.

Differential Revision: https://reviews.llvm.org/D108669
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/simd-pr51605.ll [new file with mode: 0644]