From 4edfd5a7e872700886cf731abfd34c4278378b3a Mon Sep 17 00:00:00 2001 From: akashk4 <akashk4@illinois.edu> Date: Tue, 31 Dec 2019 07:53:25 -0600 Subject: [PATCH] Assert that the VISC launch's streaming value is a defined constant. --- llvm/tools/hpvm/lib/Transforms/GenVISC/GenVISC.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/tools/hpvm/lib/Transforms/GenVISC/GenVISC.cpp b/llvm/tools/hpvm/lib/Transforms/GenVISC/GenVISC.cpp index 84180fc848..ecd1d460ea 100644 --- a/llvm/tools/hpvm/lib/Transforms/GenVISC/GenVISC.cpp +++ b/llvm/tools/hpvm/lib/Transforms/GenVISC/GenVISC.cpp @@ -943,6 +943,7 @@ bool GenVISC::runOnModule(Module &M) { Constant* F = ConstantExpr::getPointerCast(graphFunc, Type::getInt8PtrTy(Ctx)); ConstantInt* Op = cast<ConstantInt>(CI->getArgOperand(0)); + assert(Op && "VISC launch's streaming argument is a constant value."); Value* isStreaming = Op->isZero()? ConstantInt::getFalse(Ctx) : ConstantInt::getTrue(Ctx); -- GitLab