File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ void SPIRVToOCL20Base::visitCallSPIRVMemoryBarrier(CallInst *CI) {
97
97
98
98
void SPIRVToOCL20Base::visitCallSPIRVControlBarrier (CallInst *CI) {
99
99
AttributeList Attrs = CI->getCalledFunction ()->getAttributes ();
100
+ SmallVector<AttributeSet, 2 > ArgAttrs = {Attrs.getParamAttrs (1 ),
101
+ Attrs.getParamAttrs (2 )};
102
+ AttributeList NewAttrs = AttributeList::get (*Ctx, Attrs.getFnAttrs (),
103
+ Attrs.getRetAttrs (), ArgAttrs);
100
104
mutateCallInstOCL (
101
105
M, CI,
102
106
[=](CallInst *, std::vector<Value *> &Args) {
@@ -116,7 +120,7 @@ void SPIRVToOCL20Base::visitCallSPIRVControlBarrier(CallInst *CI) {
116
120
return (ExecScope == ScopeWorkgroup) ? kOCLBuiltinName ::WorkGroupBarrier
117
121
: kOCLBuiltinName ::SubGroupBarrier;
118
122
},
119
- &Attrs );
123
+ &NewAttrs );
120
124
}
121
125
122
126
std::string SPIRVToOCL20Base::mapFPAtomicName (Op OC) {
You can’t perform that action at this time.
0 commit comments