[llvm] [X86][GlobalISel] Enable G_BRJT (PR #81811)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 17:57:31 PDT 2024
e-kud wrote:
> @e-kud Sorry for the late reply, I haven't had much time recently. I applied your suggestions.
>
> I also noticed that when compiling your example with `-m32` the legalization of `G_BRJT` fails because `MJTI->getEntryKind()` returns `EK_Custom32` which seems to be using a global offset table in SelectionDAG. I haven't had time to look into how to handle that for now. If you have some tips on where to look it would be much appreciated!
In case of `-m32` we need to load the addresses using GOT. You need to create an add similar to https://godbolt.org/z/M954fjj6d, using GlobalBaseReg and `MO_GOTOFF` flag. Notice, that load of base GOT address happens by `CGBR` that is hidden from `print-after-all`.
https://github.com/llvm/llvm-project/pull/81811
More information about the llvm-commits
mailing list