File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ void CheckInstrTypes::print(llvm::raw_ostream& OS) const
171171 OS << " \n hasDynamicGenericLoadStore: " << g_InstrTypes.hasDynamicGenericLoadStore ;
172172 OS << " \n hasUnmaskedRegion: " << g_InstrTypes.hasUnmaskedRegion ;
173173 OS << " \n hasSLM: " << g_InstrTypes.hasSLM ;
174+ OS << " \n hasPrivateGEPIntoVector: " << g_InstrTypes.hasPrivateGEPIntoVector ;
174175 OS << " \n numCall: " << g_InstrTypes.numCall ;
175176 OS << " \n numBarrier: " << g_InstrTypes.numBarrier ;
176177 OS << " \n numLoadStore: " << g_InstrTypes.numLoadStore ;
@@ -754,6 +755,20 @@ void CheckInstrTypes::visitGetElementPtrInst(llvm::GetElementPtrInst& I)
754755 {
755756 g_InstrTypes.hasGenericAddressSpacePointers = true ;
756757 }
758+ else if (I.getPointerAddressSpace () == ADDRESS_SPACE::ADDRESS_SPACE_PRIVATE &&
759+ g_InstrTypes.hasPrivateGEPIntoVector == false &&
760+ I.getNumIndices () > 1 )
761+ {
762+ llvm::SmallVector<llvm::Value*, 4 > indices (I.indices ());
763+ indices.pop_back ();
764+ llvm::Type* lastIndexedType = llvm::GetElementPtrInst::getIndexedType (
765+ I.getSourceElementType (),
766+ indices);
767+ if (lastIndexedType->isVectorTy ())
768+ {
769+ g_InstrTypes.hasPrivateGEPIntoVector = true ;
770+ }
771+ }
757772}
758773
759774#undef PASS_FLAG
Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ namespace IGC
348348 bool hasDynamicGenericLoadStore{};
349349 bool hasUnmaskedRegion{};
350350 bool hasSLM{};
351+ bool hasPrivateGEPIntoVector{};
351352 unsigned int numCall{};
352353 unsigned int numBarrier{};
353354 unsigned int numLoadStore{};
You can’t perform that action at this time.
0 commit comments