[PATCH] D47589: [RISCV] Add codegen support for atomic load/stores with RV32A

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 08:42:45 PDT 2018


jfb added a comment.

> When the A extension is supported, __atomic libcalls will be generated for any atomic that isn't the native word size or has less than natural alignment.

When do you expect non-natural alignment to occur? Is this purely for C++ support? If so you're guaranteed natural alignment. Otherwise (for intrinsics or for other languages) I'd like to understand what you expect, and whether you have the guarantee that the alignment information you have is correct. Without knowing that it's absolutely correct you're going to codegen bad code (a libcall in one place, and instructions in another).


https://reviews.llvm.org/D47589





More information about the llvm-commits mailing list