diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-08 00:19:49 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-08 00:19:49 +0000 |
commit | b7e206eab9de36cefa28ca79b560772d69cfa607 (patch) | |
tree | e1f695eea0c15fa96a0c977e5781e8946f689dcb /lib | |
parent | 2bdc0dd2db145591eb3fdc01fa0b2a3d831f334b (diff) | |
download | external_llvm-b7e206eab9de36cefa28ca79b560772d69cfa607.zip external_llvm-b7e206eab9de36cefa28ca79b560772d69cfa607.tar.gz external_llvm-b7e206eab9de36cefa28ca79b560772d69cfa607.tar.bz2 |
--- Reverse-merging r196668 into '.':
U lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
U test/Transforms/InstCombine/addrspacecast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 4c861b3..0a0727e 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -263,9 +263,9 @@ Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) { for (unsigned i = 0, e = ToDelete.size(); i != e; ++i) EraseInstFromFunction(*ToDelete[i]); Constant *TheSrc = cast<Constant>(Copy->getSource()); - Constant *Cast - = ConstantExpr::getPointerBitCastOrAddrSpaceCast(TheSrc, AI.getType()); - Instruction *NewI = ReplaceInstUsesWith(AI, Cast); + Instruction *NewI + = ReplaceInstUsesWith(AI, ConstantExpr::getBitCast(TheSrc, + AI.getType())); EraseInstFromFunction(*Copy); ++NumGlobalCopies; return NewI; |