@@ -2939,20 +2939,18 @@ static void handleWorkGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {
2939
2939
return ;
2940
2940
2941
2941
WorkGroupAttr *Existing = D->getAttr <WorkGroupAttr>();
2942
- if (Existing && !(Existing-> getXDim () == WGSize[ 0 ] &&
2943
- Existing->getYDim () == WGSize[1 ] &&
2944
- Existing->getZDim () == WGSize[2 ]))
2942
+ if (Existing &&
2943
+ !(Existing-> getXDim () == WGSize[ 0 ] && Existing->getYDim () == WGSize[1 ] &&
2944
+ Existing->getZDim () == WGSize[2 ]))
2945
2945
S.Diag (AL.getLoc (), diag::warn_duplicate_attribute) << AL;
2946
2946
if (S.getLangOpts ().SYCLIsDevice )
2947
- D->addAttr (::new (S.Context )
2948
- WorkGroupAttr (S.Context , AL, WGSize[2 ], WGSize[1 ], WGSize[0 ]));
2949
- else
2950
- D->addAttr (::new (S.Context )
2951
- WorkGroupAttr (S.Context , AL, WGSize[0 ], WGSize[1 ], WGSize[2 ]));
2952
-
2947
+ D->addAttr (::new (S.Context ) WorkGroupAttr (S.Context , AL, WGSize[2 ],
2948
+ WGSize[1 ], WGSize[0 ]));
2949
+ else
2950
+ D->addAttr (::new (S.Context ) WorkGroupAttr (S.Context , AL, WGSize[0 ],
2951
+ WGSize[1 ], WGSize[2 ]));
2953
2952
}
2954
2953
2955
-
2956
2954
// Handles intel_reqd_sub_group_size.
2957
2955
static void handleSubGroupSize (Sema &S, Decl *D, const ParsedAttr &AL) {
2958
2956
uint32_t SGSize;
0 commit comments