File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -18522,6 +18522,23 @@ void EmitPass::emitLSCTypedWrite(llvm::Instruction *pInsn) {
1852218522 m_currShader->CopyVariable(pPayload, pSrc_W, 3 * numEltGRF);
1852318523 }
1852418524
18525+ WIAnalysis *WI = &getAnalysis<WIAnalysis>();
18526+ // If the dstBuf and coordinates are all uniform,
18527+ // check if all data elements have been replaced with WaveShuffleIndex
18528+ if (WI->isUniform(pllDstBuffer) && WI->isUniform(pllU) && WI->isUniform(pllV) && WI->isUniform(pllR)) {
18529+ GenIntrinsicInst *genX = dyn_cast<GenIntrinsicInst>(pllSrc_X);
18530+ GenIntrinsicInst *genY = dyn_cast<GenIntrinsicInst>(pllSrc_Y);
18531+ GenIntrinsicInst *genZ = dyn_cast<GenIntrinsicInst>(pllSrc_Z);
18532+ GenIntrinsicInst *genW = dyn_cast<GenIntrinsicInst>(pllSrc_W);
18533+ if (genX && genX->getIntrinsicID() == GenISAIntrinsic::GenISA_WaveShuffleIndex &&
18534+ genY && genY->getIntrinsicID() == GenISAIntrinsic::GenISA_WaveShuffleIndex &&
18535+ genZ && genZ->getIntrinsicID() == GenISAIntrinsic::GenISA_WaveShuffleIndex &&
18536+ genW && genW->getIntrinsicID() == GenISAIntrinsic::GenISA_WaveShuffleIndex) {
18537+ m_encoder->SetSimdSize(SIMDMode::SIMD1);
18538+ m_encoder->SetNoMask();
18539+ }
18540+ }
18541+
1852518542 m_encoder->SetPredicate(flag);
1852618543 m_encoder->LSC_TypedReadWrite(
1852718544 pGenInst->getIntrinsicID() == GenISAIntrinsic::GenISA_typedwriteMS ? LSC_STORE_QUAD_MSRT : LSC_STORE_QUAD,
You can’t perform that action at this time.
0 commit comments