commit | 6807a24de176e563843a0c5a21c9358b5eeefc2d | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Sun Aug 30 20:06:40 2009 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Sun Aug 30 20:06:40 2009 +0000 |
tree | 4df770abeae240d773c6e7e5b80782511ff8d8ab | |
parent | d6164c20cdaaa27a2cc7b340604b4df3f2b97129 [diff] [blame] |
add getPointerAddressSpace() to GEP instruction, use the method in a few scalar xforms to simplify things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80506 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 5de79c4..ca4292b 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -132,7 +132,7 @@ if (isa<UndefValue>(Ptr) || (isa<ConstantPointerNull>(Ptr) && - cast<PointerType>(Ptr->getType())->getAddressSpace() == 0)) { + SI->getPointerAddressSpace() == 0)) { ChangeToUnreachable(SI, Context); Changed = true; break;