[all-commits] [llvm/llvm-project] 7c7f46: [LICM] Fix a crash when sinking instructions w/tok...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Mar 17 11:19:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c7f4676cd421b1d64145eebfed11e5a3d8935d7
      https://github.com/llvm/llvm-project/commit/7c7f4676cd421b1d64145eebfed11e5a3d8935d7
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-03-17 (Wed, 17 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LICM.cpp
    M llvm/test/Transforms/LICM/gc-relocate.ll

  Log Message:
  -----------
  [LICM] Fix a crash when sinking instructions w/token operands

It is not legal to form a phi node with token type. The generic LCSSA construction code handles this correctly - by not forming LCSSA for such cases - but the adhoc fixup implementation in LICM did not.

This was noticed in the context of PR49607, but can be demonstrated on ToT with the tweaked test case. This is not specific to gc.relocate btw, it also applies to usage of the preallocated family of intrinsics as well.

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




More information about the All-commits mailing list