[llvm-dev] [RISC-V] Infinite loop when disabled Atomic

kamlesh kumar via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 6 05:34:57 PDT 2020


Hi devs,
please consider below scenario,
while compiling
https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/atomic.c
with command(A extension disabled )
$clang --target=riscv64 -march=rv64imfdc -mabi=lp64d -c atomic.o atomic.c
after dumping atomic.o we see  that
below call
(atomic.c#L95) lock -> (atomic.c#L198) __atomic_compare_exchange ->
(atomic.c#L95) lock

any thought on, how can we break this loop?
do we need to provide platform-specific lock here since the generic
lock is causing the problem?


More information about the llvm-dev mailing list