OSDN Git Service

Mark guards on true as "trivially dead"
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 29 Apr 2016 22:23:16 +0000 (22:23 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 29 Apr 2016 22:23:16 +0000 (22:23 +0000)
commit3aa5468391f6e530d551b12358697412a2d3296d
tree9e5eec3ef6276bd7e40edb79220082ba091f5f08
parentccc43fcdeb03948f2946d521c866e3e7dfd2b15e
Mark guards on true as "trivially dead"

This moves some logic added to EarlyCSE in rL268120 into
`llvm::isInstructionTriviallyDead`.  Adds a test case for DCE to
demonstrate that passes other than EarlyCSE can now pick up on the new
information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268126 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/EarlyCSE.cpp
lib/Transforms/Utils/Local.cpp
test/Transforms/DCE/guards.ll [new file with mode: 0644]