https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98977
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- LLVM has a separate module to merge sub and cmp, GCC can do similar thing. Alternative choice is canonicalizing cmp patterns to be same as subs' with a unused dest(result of sub), then CSE/PRE would be able to do the elimination work?