File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,11 @@ void CustomSafeOptPass::visitCallInst(CallInst& C)
446
446
break ;
447
447
}
448
448
449
+ case GenISAIntrinsic::GenISA_WaveShuffleIndex:
450
+ {
451
+ visitWaveShuffleIndex (inst);
452
+ break ;
453
+ }
449
454
default :
450
455
break ;
451
456
}
@@ -1173,6 +1178,15 @@ void IGC::CustomSafeOptPass::visitLdptr(llvm::CallInst* inst)
1173
1178
}
1174
1179
}
1175
1180
1181
+ void IGC::CustomSafeOptPass::visitWaveShuffleIndex (llvm::CallInst* inst)
1182
+ {
1183
+ llvm::Constant* src1 = llvm::dyn_cast<llvm::Constant>(inst->getOperand (1 ));
1184
+ llvm::Constant* src2 = llvm::dyn_cast<llvm::Constant>(inst->getOperand (2 ));
1185
+ if (src1 && src2 && src1->isZeroValue () && src2->isZeroValue ())
1186
+ {
1187
+ inst->replaceAllUsesWith (inst->getOperand (0 ));
1188
+ }
1189
+ }
1176
1190
1177
1191
void IGC::CustomSafeOptPass::visitLdRawVec (llvm::CallInst* inst)
1178
1192
{
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ namespace IGC
82
82
void visitLdptr (llvm::CallInst* inst);
83
83
void visitLdRawVec (llvm::CallInst* inst);
84
84
void visitLoadInst (llvm::LoadInst& I);
85
+ void visitWaveShuffleIndex (llvm::CallInst* inst);
85
86
86
87
//
87
88
// IEEE Floating point arithmetic is not associative. Any pattern
You can’t perform that action at this time.
0 commit comments