aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-07-17 21:27:44 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-07-17 21:27:44 +0000
commitf45fd429b7184845f7f6567227df32ebb94a04af (patch)
tree1aeb843a64c9e925f17cd3c287a6c7bd854ab6ab /llvm/lib
parenteece5a9d31840de69a074ed1ea3ed7c0e44916a0 (diff)
downloadllvm-f45fd429b7184845f7f6567227df32ebb94a04af.zip
llvm-f45fd429b7184845f7f6567227df32ebb94a04af.tar.gz
llvm-f45fd429b7184845f7f6567227df32ebb94a04af.tar.bz2
Speculative fix for stack-tagging.ll failure.
Depending on the evaluation order of function call arguments, the current code may insert a use before def. llvm-svn: 366375
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64StackTagging.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
index f27a631..6e99c48 100644
--- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
@@ -316,8 +316,8 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
untagAlloca(AI, Info.LifetimeEnd[0], Size);
} else {
uint64_t Size = Info.AI->getAllocationSizeInBits(*DL).getValue() / 8;
- tagAlloca(AI, TagPCall->getNextNode(),
- IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy()), Size);
+ Value *Ptr = IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy());
+ tagAlloca(AI, &*IRB.GetInsertPoint(), Ptr, Size);
for (auto &RI : RetVec) {
untagAlloca(AI, RI, Size);
}