File tree Expand file tree Collapse file tree 2 files changed +4
-58
lines changed
Optimizer/OpenCLPasses/LSCFuncs Expand file tree Collapse file tree 2 files changed +4
-58
lines changed Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ Instruction* LSCFuncsResolution::CreateLSCAtomicIntrinsicCallInst(
497497 atomArg2, // value [cmpxchg] or zero if unused
498498 getConstantInt32 (atomicOp), // atomic op
499499 isLocalMem ? // cache options (default for local)
500- getConstantInt32 (LSC_L1DEF_L3DEF) : getCacheControlOpts (ccOpndIx, true )
500+ getConstantInt32 (LSC_L1DEF_L3DEF) : getCacheControlOpts (ccOpndIx)
501501 };
502502
503503 GenISAIntrinsic::ID id =
@@ -807,26 +807,10 @@ Constant *LSCFuncsResolution::getImmediateElementOffset(
807807 }
808808}
809809
810- Constant *LSCFuncsResolution::getCacheControlOpts (int i, bool isAtomic )
810+ Constant *LSCFuncsResolution::getCacheControlOpts (int i, bool )
811811{
812- Constant *c = getImmediateEnum (i, LSC_L1DEF_L3DEF, LSC_L1IAR_WB_L3C_WB);
813-
814- if (isAtomic)
815- {
816- ConstantInt* ci = dyn_cast<ConstantInt>(c);
817- switch (ci->getZExtValue ())
818- {
819- case LSC_L1DEF_L3DEF:
820- case LSC_L1UC_L3UC:
821- case LSC_L1UC_L3C_WB:
822- break ;
823- default :
824- reportError (" atomic must not use caching on L1" );
825- c = getConstantInt32 (LSC_L1DEF_L3DEF);
826- }
827- }
828-
829- return c;
812+ // TODO: error if atomic uses any sort of caching on L1
813+ return getImmediateEnum (i, LSC_L1DEF_L3DEF, LSC_L1IAR_WB_L3C_WB);
830814}
831815
832816void LSCFuncsResolution::reportError (const char *what) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments