[all-commits] [llvm/llvm-project] a5bb24: [llvm-reduce] Create returns with undef values for...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Aug 31 08:39:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a5bb24758d02e1e42b72561d0ddbd682776d1a4d
      https://github.com/llvm/llvm-project/commit/a5bb24758d02e1e42b72561d0ddbd682776d1a4d
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-08-31 (Mon, 31 Aug 2020)

  Changed paths:
    M llvm/test/Reduce/remove-bbs-ret-nonvoid.ll
    M llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp

  Log Message:
  -----------
  [llvm-reduce] Create returns with undef values for non-void functions.

Currently replaceBranchTerminator/removeUninterestingBBsFromSwitch
always creates `ret void` instructions if no successor is in the chunk.

This results in invalid IR for functions with non-void return types,
which makes those reductions unfeasible. Instead, create `ret ty undef`
for functions with non-void return types.

Reviewed By: lebedev.ri

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




More information about the All-commits mailing list