@@ -127,7 +127,8 @@ void SPIRVRegularizer::runLowerConstExpr(Function &F) {
127
127
ReplList.push_back (Inst);
128
128
Repl = InsertElementInst::Create (
129
129
(Repl ? Repl : PoisonValue::get (Vec->getType ())), V,
130
- ConstantInt::get (Type::getInt32Ty (Ctx), Idx++), " " , InsPoint);
130
+ ConstantInt::get (Type::getInt32Ty (Ctx), Idx++), " " ,
131
+ InsPoint->getIterator ());
131
132
}
132
133
WorkList.splice (WorkList.begin (), ReplList);
133
134
return Repl;
@@ -234,11 +235,12 @@ void SPIRVRegularizer::visitCallScalToVec(CallInst *CI, StringRef MangledName,
234
235
// %call = OpExtInst %v2uint %1 s_min %14 %11
235
236
auto ConstInt = ConstantInt::get (IntegerType::get (CI->getContext (), 32 ), 0 );
236
237
PoisonValue *PVal = PoisonValue::get (Arg0Ty);
237
- Instruction *Inst =
238
- InsertElementInst::Create ( PVal, CI->getOperand (1 ), ConstInt, " " , CI);
238
+ Instruction *Inst = InsertElementInst::Create (
239
+ PVal, CI->getOperand (1 ), ConstInt, " " , CI-> getIterator () );
239
240
ElementCount VecElemCount = cast<VectorType>(Arg0Ty)->getElementCount ();
240
241
Constant *ConstVec = ConstantVector::getSplat (VecElemCount, ConstInt);
241
- Value *NewVec = new ShuffleVectorInst (Inst, PVal, ConstVec, " " , CI);
242
+ Value *NewVec =
243
+ new ShuffleVectorInst (Inst, PVal, ConstVec, " " , CI->getIterator ());
242
244
CI->setOperand (1 , NewVec);
243
245
CI->replaceUsesOfWith (OldF, NewF);
244
246
CI->mutateFunctionType (NewF->getFunctionType ());
0 commit comments