Commit Graph

2 Commits

Author SHA1 Message Date
Florian Hahn a5bb24758d [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
2020-08-31 16:33:46 +01:00
Florian Hahn c01a4adf99 [llvm-reduce] Add test for BB reduction with non-void ret type.
Precommit test for D86849.
2020-08-30 20:11:07 +01:00