Skip to content

Commit 3976c0b

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: c3e6c9d: Don't cache volatile load store instructions
On platforms with default cache policy set to L1 and L3 cached such as DG2 or BMG volatile instructions are also cached. Since CUDA doesn't cache volatile pointers, there is a code that is not supported by Intel GPU, as caching volatile can lead to hangs.
1 parent b23eb1e commit 3976c0b

File tree

2 files changed

+1
-101
lines changed

2 files changed

+1
-101
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23173,33 +23173,6 @@ bool EmitPass::tryOverrideCacheOpts(
2317323173
return l1l3CacheVal != 0;
2317423174
}
2317523175

23176-
static bool isVolatileInst(Instruction *inst) {
23177-
if (!inst)
23178-
return false;
23179-
23180-
// TODO: Instead of this helper function inst can be casted to either
23181-
// ALoadInst/AStoreInst class or AbstractLoadInst/AbstractStoreInst
23182-
// to call inst->isVolatile() only once, after they're refactored.
23183-
if (auto *GII = dyn_cast<GenIntrinsicInst>(inst)) {
23184-
switch (GII->getIntrinsicID()) {
23185-
default:
23186-
return false;
23187-
case GenISAIntrinsic::GenISA_ldraw_indexed:
23188-
case GenISAIntrinsic::GenISA_ldrawvector_indexed:
23189-
return cast<LdRawIntrinsic>(inst)->isVolatile();
23190-
case GenISAIntrinsic::GenISA_storeraw_indexed:
23191-
case GenISAIntrinsic::GenISA_storerawvector_indexed:
23192-
return cast<StoreRawIntrinsic>(inst)->isVolatile();
23193-
case GenISAIntrinsic::GenISA_PredicatedLoad:
23194-
return cast<PredicatedLoadIntrinsic>(inst)->isVolatile();
23195-
case GenISAIntrinsic::GenISA_PredicatedStore:
23196-
return cast<PredicatedStoreIntrinsic>(inst)->isVolatile();
23197-
}
23198-
}
23199-
23200-
return inst->isVolatile();
23201-
}
23202-
2320323176
LSC_CACHE_OPTS
2320423177
EmitPass::translateLSCCacheControlsFromMetadata(Instruction *inst, bool isLoad,
2320523178
bool isTGM) const {
@@ -23288,7 +23261,7 @@ EmitPass::translateLSCCacheControlsFromMetadata(Instruction *inst, bool isLoad,
2328823261
return translateLSCCacheControlsFromValue(MD->getValue(), isLoad);
2328923262
}
2329023263
node = inst ? inst->getMetadata(LLVMContext::MD_nontemporal) : nullptr;
23291-
if (node || isVolatileInst(inst)) {
23264+
if (node) {
2329223265
return {LSC_CACHING_UNCACHED, LSC_CACHING_UNCACHED};
2329323266
}
2329423267

IGC/Compiler/tests/EmitVISAPass/uncached-load-store-volatile.ll

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)