[llvm] r293251 - [NVPTX] Fix use-after-stack-free bug in InstCombineCalls.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 17:49:39 PST 2017


Author: jlebar
Date: Thu Jan 26 19:49:39 2017
New Revision: 293251

URL: http://llvm.org/viewvc/llvm-project?rev=293251&view=rev
Log:
[NVPTX] Fix use-after-stack-free bug in InstCombineCalls.

Introduced in r293244.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=293251&r1=293250&r2=293251&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Thu Jan 26 19:49:39 2017
@@ -1717,7 +1717,7 @@ static Instruction *SimplifyNVVMIntrinsi
     SmallVector<Value *, 4> 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<Type *> Tys = {II->getArgOperand(0)->getType()};
+    Type *Tys[] = {II->getArgOperand(0)->getType()};
     return CallInst::Create(
         Intrinsic::getDeclaration(II->getModule(), *Action.IID, Tys), Args);
   }




More information about the llvm-commits mailing list