Remove dyn_cast + dereference pattern by replacing it with a cast and changing
authorNick Lewycky <nicholas@mxc.ca>
Sun, 24 Jun 2012 10:15:42 +0000 (10:15 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 24 Jun 2012 10:15:42 +0000 (10:15 +0000)
commitedb5842b7cf53ba4a4b5d3e1bad49a9fad47c02b
tree0e82ce0a7cb7d17aa5e3ec1ee617df89b4e87fdf
parente7f702fc2d496aff1e5c1153519931e203b1ca76
Remove dyn_cast + dereference pattern by replacing it with a cast and changing
the safety check to look for the same type we're going to actually cast to.
Fixes PR13180!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159110 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/branch-fold.ll