[llvm-reduce] Skip terminators when reducing instructions.
authorFlorian Hahn <flo@fhahn.com>
Sun, 23 Aug 2020 15:13:43 +0000 (16:13 +0100)
committerFlorian Hahn <flo@fhahn.com>
Sun, 23 Aug 2020 16:20:34 +0000 (17:20 +0100)
commit51a82828fb291fc8f7768711c4b769157d5f0227
tree9aeffbd63f0e5f65e45f59b45413ea05fb53478b
parentbef684154d400df5cfd935a18ed7312a582fe5eb
[llvm-reduce] Skip terminators when reducing instructions.

Removing terminators will result in invalid IR, making further
reductions pointless. I do not think there is any valid use case where
we actually want to create invalid IR as part of a reduction.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D86210
llvm/test/Reduce/do-not-remove-terminator.ll [new file with mode: 0644]
llvm/test/Reduce/remove-funcs.ll
llvm/test/Reduce/remove-instructions.ll
llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp