D153645 added additional X-Form load/stores that can be generated for TLS accesses.
However, these added instructions have not been accounted for in lld. As a result,
lld does not know how to handle them and cannot relax initial-exec to local-exec
when the initial-exec sequence contains these additional load/stores.
This patch aims to resolve https://github.com/llvm/llvm-project/issues/64424.
I understand the motivation to return both the primary opcode and the last two bits here to differentiate LWA from LD/STD. However, I am not a fan of the different interface of these very similar and related functions.
Do any users of getPPCDFormOp() need the primary opcode to be in the least significant bits? Could we change the interface to return the instruction with the primary opcode in the most significant bits regardless of whether it is D-Form/DS-Form or even (in the future) DQ-Form?