[all-commits] [llvm/llvm-project] 25af21: [WebAssembly] Fix ISel crash in SIGN_EXTEND_INREG ...

Thomas Lively via All-commits all-commits at lists.llvm.org
Wed Jun 3 15:37:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 25af2126f93a76f39c3121b3ddccdfd9f1aba4be
      https://github.com/llvm/llvm-project/commit/25af2126f93a76f39c3121b3ddccdfd9f1aba4be
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    A llvm/test/CodeGen/WebAssembly/simd-nonconst-sext.ll

  Log Message:
  -----------
  [WebAssembly] Fix ISel crash in SIGN_EXTEND_INREG lowering

Summary:
The code previously assumed that the index of a vector extract was
constant, but this was not always true. This patch fixes the problem
by bailing out of the lowering if the index is nonconstant and also
replaces `static_cast`s in the lowering function with `cast`s because
the latter contain type-checking asserts that would make similar
issues easier to find and debug.

Reviewers: aheejin

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

Tags: #llvm

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




More information about the All-commits mailing list