[all-commits] [llvm/llvm-project] 5b6575: [llvm-reduce] Do not crash when accessing landingp...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Nov 18 07:20:45 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b6575d50eab705b6d3b20c9f92b9aece5e1bd24
      https://github.com/llvm/llvm-project/commit/5b6575d50eab705b6d3b20c9f92b9aece5e1bd24
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-11-18 (Fri, 18 Nov 2022)

  Changed paths:
    A llvm/test/tools/llvm-reduce/invoke-with-missing-landingpad.ll
    M llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp

  Log Message:
  -----------
  [llvm-reduce] Do not crash when accessing landingpads of invokes.

Unconditionally removing landing pads results in invalid IR,
if there is a different `invoke` that uses it. Update the code
to only remove the landing pad if the current invoke is the only
user. Also carefully avoid creating plain branches to bbs with
landing pads we couldn't remove.

Reviewed By: arsenm, aeubanks

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




More information about the All-commits mailing list