OSDN Git Service

[CodeGenPrepare] Don't create dead instructions in addrmode sinking
authorEli Friedman <efriedma@codeaurora.org>
Wed, 12 Jul 2017 23:30:02 +0000 (23:30 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 12 Jul 2017 23:30:02 +0000 (23:30 +0000)
commitdd70def46c1772d440b75fca30e87e80fee0266e
treeb1ddb5b9e852234e6d50dc43e94e4a6263c177e8
parent7bac219fe19c95b696beffc80dc93bd75524243b
[CodeGenPrepare] Don't create dead instructions in addrmode sinking

When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.

Fixes https://bugs.llvm.org/show_bug.cgi?id=33608 .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307866 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp
test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll