summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-04-28 17:40:03 +0000
committerHans Wennborg <hans@hanshq.net>2014-04-28 17:40:03 +0000
commite36e11682651051ec0530d4b15f4cf50a0e8ccbd (patch)
tree6ca93755800d8e288596a572eca8c94c53d5be15 /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
parent6efaf1182bb755ed8c6e346d77e1b22f584e0748 (diff)
downloadbcm5719-llvm-e36e11682651051ec0530d4b15f4cf50a0e8ccbd.tar.gz
bcm5719-llvm-e36e11682651051ec0530d4b15f4cf50a0e8ccbd.zip
InstCombine: don't drop 'inalloca' in PromoteCastOfAllocation (PR19569)
llvm-svn: 207426
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index de8b94d6c2e..70b0a8343f6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -143,6 +143,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(BitCastInst &CI,
AllocaInst *New = AllocaBuilder.CreateAlloca(CastElTy, Amt);
New->setAlignment(AI.getAlignment());
New->takeName(&AI);
+ New->setUsedWithInAlloca(AI.isUsedWithInAlloca());
// If the allocation has multiple real uses, insert a cast and change all
// things that used it to use the new cast. This will also hack on CI, but it
OpenPOWER on IntegriCloud