From: Justin Lebar Date: Fri, 27 Jan 2017 01:49:39 +0000 (+0000) Subject: [NVPTX] Fix use-after-stack-free bug in InstCombineCalls. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2420ede9b67ed104daaff0444b440d6d80318558;p=llvm [NVPTX] Fix use-after-stack-free bug in InstCombineCalls. Introduced in r293244. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293251 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 8e1e1c58a3b..8109441eec9 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1717,7 +1717,7 @@ static Instruction *SimplifyNVVMIntrinsic(IntrinsicInst *II, InstCombiner &IC) { SmallVector Args(II->arg_operands()); // All the target-generic intrinsics currently of interest to us have one // type argument, equal to that of the nvvm intrinsic's argument. - ArrayRef Tys = {II->getArgOperand(0)->getType()}; + Type *Tys[] = {II->getArgOperand(0)->getType()}; return CallInst::Create( Intrinsic::getDeclaration(II->getModule(), *Action.IID, Tys), Args); }