On Wed, 9 Jun 2021 16:47:21 +0200 Marcel Vollweiler <mar...@codesourcery.com> wrote:
> This patch fixes an issue with global_load assembler functions leading > to a "invalid operand for instruction" error since in different LLVM > versions those functions use either one or two registers. LLVM is neither forward- nor backward-compatible with regards to those registers then, I guess? That's unfortunate... > In this patch a compatibility check is added to the configure.ac. The implementation of the solution looks fine, but I worry it's the wrong approach. What would someone packing GCC for a distribution use for the configuration setting? It'd mean having a dependency on the exact LLVM version for a given offloading-compiler build -- so LLVM couldn't be upgraded separately from the offloading compiler. Maybe that's OK in practice? I wonder if the LLVM assembler has a macro system we could abuse instead? Perhaps not. Or another (very ugly) alternative that would work with either assembler is giving up and emitting the instruction bit patterns directly (as we have done elsewhere for certain "SCC"-setting instructions). Julian