diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2015-04-03 07:23:15 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-04-13 16:16:10 +0800 |
commit | b4fe645e17f998420e8acdc60b1b9b6187a6db94 (patch) | |
tree | d081a5551acd9b7fc9585192384fc6e5d5113c47 | |
parent | a4acb1cb08cb3bc035dfeffc14a94bfbdc7a0d90 (diff) | |
download | beignet-b4fe645e17f998420e8acdc60b1b9b6187a6db94.tar.gz |
GBE: fix an potential assertion in constant expanding pass.
Using the inserPos is good enough. If using --insertPos, there
is one potential issue when the insertPos is the head of a list
then it will trigger an assertion.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
-rw-r--r-- | backend/src/llvm/ExpandConstantExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/llvm/ExpandConstantExpr.cpp b/backend/src/llvm/ExpandConstantExpr.cpp index 2da765e1..5c5934ad 100644 --- a/backend/src/llvm/ExpandConstantExpr.cpp +++ b/backend/src/llvm/ExpandConstantExpr.cpp @@ -120,7 +120,7 @@ static Value *expandConstantVector(Instruction *InsertPt, ConstantVector *CV) { Type *IntTy = IntegerType::get(CV->getContext(), 32); BasicBlock::iterator InsertPos(InsertPt); - IRBuilder<> IRB(--InsertPos); + IRBuilder<> IRB(InsertPos); Value *vec = UndefValue::get(CV->getType()); for (int i = 0; i < elemNum; i++) { Value *idx = ConstantInt::get(IntTy, i); |