<div dir="ltr">Hello OpenMP dev,<div><br></div><div>A motivating example is atomicInc for amdgcn. There is ISA support for this so a good implementation folds to a single instruction. There is no corresponding clang intrinsic, though there is an llvm intrinsic.<div><br><div>I see the following options:</div><div>- Implement it in IR, linked into deviceRTL</div><div>- Inline assembly</div><div>- Delay implementation until the intrinsic can be added to clang</div><div>- Implement in terms of CAS</div><div>- Your suggestion here</div><div><br></div><div>Adding atomicInc.ll to the source tree is the easy short term fix. It has drawbacks in terms of future ABI change, build complexity and limited precedent - libclc does this, but nowhere else.</div><div><br></div><div>Inline assembly works (modulo getting the syntax right) and hits the right instruction.</div><div><br></div><div>Implementing in terms of CAS means one can stay in HIP or OpenCL, but performance suffers.</div><div><br></div><div>What would the you prefer out of these options?<br></div><div><br></div><div>Thanks,</div><div><br></div><div>Jon</div></div></div></div>