Do not remove implicit defs in BranchFolder
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 12 Oct 2016 19:50:57 +0000 (19:50 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 12 Oct 2016 19:50:57 +0000 (19:50 +0000)
commit8271be9a1da41ac9221fc13831a9166ddf53a002
tree48ac3801b0cd9b71f22e5dba8fb3199f75f68991
parent105a3ce06269eb5c45a4820aba9d04f26de1fbdf
Do not remove implicit defs in BranchFolder

Branch folder removes implicit defs if they are the only non-branching
instructions in a block, and the branches do not use the defined registers.
The problem is that in some cases these implicit defs are required for
the liveness information to be correct.

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

llvm-svn: 284036
llvm/lib/CodeGen/BranchFolding.cpp
llvm/lib/CodeGen/BranchFolding.h
llvm/test/CodeGen/Hexagon/branchfolder-keep-impdef.ll [new file with mode: 0644]
llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll