[all-commits] [llvm/llvm-project] 786da4: [WebAssembly] Don't copy noreturn attr to invokes

Heejin Ahn via All-commits all-commits at lists.llvm.org
Thu Jan 27 21:05:20 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 786da40667dc311b07a666abe3f5ca29d871de40
      https://github.com/llvm/llvm-project/commit/786da40667dc311b07a666abe3f5ca29d871de40
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
    M llvm/test/CodeGen/WebAssembly/lower-em-ehsjlj.ll

  Log Message:
  -----------
  [WebAssembly] Don't copy noreturn attr to invokes

When we create an invoke wrapper call, if the original call instruction
has a `noreturn` attribute, we shouldn't copy it, because we expect
invoke wrapper calls to return. This generated incorrect `free` call
before an invoke wrapper call that calls `__cxa_throw`, because
`__cxa_throw` has `noreturn` attribute.

Reviewed By: dschuff

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




More information about the All-commits mailing list