[LSR] Rewrite misses some fixup locations if it splits critical edge
authorQuentin Colombet <quentin.colombet@gmail.com>
Mon, 15 Apr 2019 22:23:46 +0000 (22:23 +0000)
committerQuentin Colombet <quentin.colombet@gmail.com>
Mon, 15 Apr 2019 22:23:46 +0000 (22:23 +0000)
commitfda04268886028c0b0b7fd9546548714e4209d5e
tree63f5958acf33d8f9fc9db8afbadd06bb1262e315
parentde68a375181f4e831f4d558a75508e0426ba7327
[LSR] Rewrite misses some fixup locations if it splits critical edge

If LSR split critical edge during rewriting phi operands and
phi node has other pending fixup operands, we need to
update those pending fixups. Otherwise formulae will not be
implemented completely and some instructions will not be eliminated.

llvm.org/PR41445

Differential Revision: https://reviews.llvm.org/D60645

Patch by: Denis Bakhvalov <denis.bakhvalov@intel.com>

llvm-svn: 358457
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/Transforms/LoopStrengthReduce/missing-phi-operand-update.ll [new file with mode: 0644]