[all-commits] [llvm/llvm-project] 80eec0: llvm-reduce: Fix introducing unreachable code in s...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Mar 31 19:36:29 PDT 2025


  Branch: refs/heads/users/arsenm/llvm-reduce/avoid-introducing-unreachable-code-simplify-conditionals
  Home:   https://github.com/llvm/llvm-project
  Commit: 80eec0683d3659d470ef88206ac25c47c7af1e01
      https://github.com/llvm/llvm-project/commit/80eec0683d3659d470ef88206ac25c47c7af1e01
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M llvm/test/tools/llvm-reduce/reduce-conditionals.ll
    M llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
    M llvm/tools/llvm-reduce/deltas/Utils.cpp
    M llvm/tools/llvm-reduce/deltas/Utils.h

  Log Message:
  -----------
  llvm-reduce: Fix introducing unreachable code in simplify conditionals

After replacing the branch condition, this was calling simplifyCFG to
perform the cleanups of the branch. This is far too heavy of a hammer.
We do not want all of the extra optimizations in simplifyCFG, and
this could also leave behind dead code. Instead, minimally fold the
terminator and try to delete the newly dead code.

This is pretty much a direct copy of what bugpoint does.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list