[all-commits] [llvm/llvm-project] 3b2476: [WASM] Prevent casting `undef` to `CosntantSDNode`

Peter Rong via All-commits all-commits at lists.llvm.org
Thu Mar 30 20:14:24 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b2476910ba33f1112c1b915b3cf41033ffd7e1a
  Author: Peter Rong <PeterRong96 at gmail.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    A llvm/test/CodeGen/WebAssembly/pr61828.ll

  Log Message:
  [WASM] Prevent casting `undef` to `CosntantSDNode`

WebAssembly tries to cast an `undef` to `CosntantSDNode` during `LowerAccessVectorElement`.
These operations will trigger an assertion error in cast.
To avoid this issue, we prevent casting, and abort the lowering operation.
A unit test is also included.

This patch fixes [pr61828](https://github.com/llvm/llvm-project/issues/61828)

Reviewed By: tlively

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

More information about the All-commits mailing list