You could try using a custom target json and setting atomic-cas
to true
and max-atomic-width
to whatever you want to support. Then implement the necessary library functions that LLVM will emit when an atomic operation is needed. You can use this file in compiler-builtins
as a base to see how it can be done.