[llvm] [RISCV] Use proper LLA operand for constant from load (PR #142292)
Carl Nettelblad via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 14:22:51 PDT 2025
cnettel wrote:
> > Again, the actual bug is that the current code assumes the RISCVISD::LLA node itself to also be a ConstantPoolSDNode, which is impossible. The ConstantPoolSDNode is instead an operand to that node. The current code will never provide a non-null result if the constant pool reference is done using RISCVISD::LLA.
>
> HI/ADD_LO is used for the "small" codemodel. LLA is used for PIC and the medium code model. The relevant flags are `-code-model=small` vs `-code-model=medium` or `-relocation-model=pic`.
Thanks. I thought I tried pic, since that made sense from other platforms, but maybe I didn't check the results enough.
https://github.com/llvm/llvm-project/pull/142292
More information about the llvm-commits
mailing list