[PATCH] D47589: [RISCV] Add codegen support for atomic load/stores with RV32A
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 11:55:15 PDT 2018
asb added a comment.
In https://reviews.llvm.org/D47589#1117778, @jfb wrote:
> > 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).
That comment simply reflects the status quo for behaviour of AtomicExpandPass, that I simply replicated. Do you think it would be worth doing `report_fatal_error` if Align < Size?
https://reviews.llvm.org/D47589
More information about the llvm-commits
mailing list