[X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offse...
authorMax Kazantsev <mkazantsev@azul.com>
Thu, 4 Mar 2021 08:41:22 +0000 (15:41 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Thu, 4 Mar 2021 09:47:43 +0000 (16:47 +0700)
commit9d5af555891d8187bfb4a5f573e059081af99571
tree5f02e02011950c23630a4ea09bf5b14ba7b6d664
parent49c91a64fd375574970ed5d8c926f71425d18d76
[X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offset, part 2

This patch enables the case where we do not completely eliminate offset.
Supposedly in this case we reduce live range overlap that never harms, but
since there are doubts this is true, this goes as a separate change.

Differential Revision: https://reviews.llvm.org/D96399
Reviewed By: reames
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll
llvm/test/CodeGen/X86/overflowing-iv.ll
llvm/test/CodeGen/X86/usub_inc_iv.ll