@@ -396,7 +396,7 @@ void CustomSafeOptPass::mergeDotAddToDp4a(llvm::CallInst *I) {
396
396
};
397
397
398
398
// found %id213- = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 0, i32 %305, i32 %345)
399
- GenIntrinsicInst *instr = dyn_cast <GenIntrinsicInst>(I);
399
+ GenIntrinsicInst *instr = cast <GenIntrinsicInst>(I);
400
400
401
401
if (ConstantInt *CI = dyn_cast<ConstantInt>(instr->getOperand (0 ))) {
402
402
// make sure operand(0) value is (i32 0)
@@ -6286,7 +6286,7 @@ void InsertBranchOpt::atomicSplitOpt(Function &F, int mode) {
6286
6286
NewInst = builder.CreateCall (pLdIntrinsic, ld_FunctionArgList);
6287
6287
}
6288
6288
// Stateless atomic
6289
- else if ( (dyn_cast <GenIntrinsicInst>(inst))->getIntrinsicID () == GenISAIntrinsic::GenISA_intatomicrawA64 )
6289
+ else if ( (cast <GenIntrinsicInst>(inst))->getIntrinsicID () == GenISAIntrinsic::GenISA_intatomicrawA64 )
6290
6290
{
6291
6291
NewInst = builder.CreateLoad ( inst->getType (), inst->getOperand ( 0 ) );
6292
6292
return NewInst;
@@ -6393,7 +6393,7 @@ void InsertBranchOpt::atomicSplitOpt(Function &F, int mode) {
6393
6393
}
6394
6394
6395
6395
IRBuilder<> builder (inst);
6396
- Instruction *src = dyn_cast <Instruction>(inst->getOperand (srcID));
6396
+ Instruction *src = cast <Instruction>(inst->getOperand (srcID));
6397
6397
Instruction *readI = nullptr ;
6398
6398
Instruction *ThenTerm = nullptr ;
6399
6399
Instruction *ElseTerm = nullptr ;
@@ -6408,7 +6408,7 @@ void InsertBranchOpt::atomicSplitOpt(Function &F, int mode) {
6408
6408
// use the original atomic add/sub/umax inst
6409
6409
// else
6410
6410
// use typedread or load
6411
- Instruction *condInst = dyn_cast <Instruction>(builder.CreateICmp (ICmpInst::ICMP_NE, src, builder.getInt32 (0 )));
6411
+ Instruction *condInst = cast <Instruction>(builder.CreateICmp (ICmpInst::ICMP_NE, src, builder.getInt32 (0 )));
6412
6412
splitBBAndName (condInst, inst, &ThenTerm, &ElseTerm, MergeBlock);
6413
6413
inst->moveBefore (ThenTerm);
6414
6414
@@ -6423,7 +6423,7 @@ void InsertBranchOpt::atomicSplitOpt(Function &F, int mode) {
6423
6423
// use the original atomic umax/umin inst src
6424
6424
readI = createReadFromAtomic (builder, inst, isTyped);
6425
6425
CmpInst::Predicate predicate = (op == AtomicOp::EATOMIC_UMAX) ? ICmpInst::ICMP_UGT : ICmpInst::ICMP_ULT;
6426
- Instruction *condInst = dyn_cast <Instruction>(builder.CreateICmp (predicate, src, readI));
6426
+ Instruction *condInst = cast <Instruction>(builder.CreateICmp (predicate, src, readI));
6427
6427
6428
6428
splitBBAndName (condInst, inst, &ThenTerm, nullptr , MergeBlock);
6429
6429
inst->moveBefore (ThenTerm);
0 commit comments