Tail duplication pass can cause appearing of redundant intructions (see attached .ll test). Support the simpliest cases in separate MachineIR pass.
The number of removed instruction from statistics output on LLVM test-suite
Tests: 2025
Metric: riscv-addsub-comb.NumRemovedInstructions
Program riscv-addsub-comb.NumRemovedInstructions
results
ultiSource...nchmarks/tramp3d-v4/tramp3d-v4 16.00
ultiSource/Applications/sqlite3/sqlite3 15.00
ultiSource/Applications/lemon/lemon 7.00
ultiSource...ch/office-ispell/office-ispell 7.00
ultiSource.../DOE-ProxyApps-C++/CLAMR/CLAMR 6.00
ultiSource...chmarks/Prolangs-C/agrep/agrep 6.00
ultiSource/Applications/ClamAV/clamscan 5.00
ultiSource...gs-C/TimberWolfMC/timberwolfmc 2.00
ultiSource...Prolangs-C/assembler/assembler 2.00
ultiSource/Applications/lua/lua 1.00
ultiSource...Benchmarks/7zip/7zip-benchmark 1.00
ultiSource...omotive-susan/automotive-susan 1.00
This list is supposed to be alphabetical. Looks like MakeCompressible broke that, but we shouldn't make it worse.