[llvm-dev] __sync_synchronize() crashes when compiling OpenMP to a GPU target

Ahmed ElTantawy via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 23 11:30:05 PDT 2016


Hi,

I get this error when compiling a code that contains "__sync_synchronize()"

fatal error: error in backend: Cannot select: 0x85ddfb0: ch = AtomicFence
0x85fd8d8, 0x85c7890, 0x85dd9e8 [ORD=4] [ID=27]example.c:378:13
  0x85c7890: i64 = Constant<7> [ID=5]example.c:378:13
  0x85dd9e8: i64 = Constant<1> [ID=6]example.c:378:13

I believe it should be equivalent to  "__threadfence()" in CUDA and "call
void @llvm.nvvm.membar.gl()" in LLVM-IR. However, I am not sure where to
locate the fix. Any ideas ?

Bests regards,
Ahmed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/95c70369/attachment.html>


More information about the llvm-dev mailing list