[llvm-dev] [GlobalISel] Importing isel patterns for instructions with LLT pointer operand type from td files
Petar Avramovic via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 15 06:56:44 PST 2019
Hi,
In GlobalISel we let pointer G_ICMP and G_SELECT to be legal,
pointer operands get register bank that corresponds to integer type off
pointer size during regbankselect,
and we manually select them as if pointer was an integer.
With the help of selectImpl
G_ICMP can be selected into integer compare and
G_SELECT is selected into appropriate instruction based or register bank
of operands.
However this does not work for pointer LLT.
On some targets, SDAG converts pointers to appropriate integer type and
uses instruction that is defined with integer type in td files.
Thus these instructions can't be imported for pointer type by GlobalISel
since there is no such record.
Can/should we add something to td file to avoid manual selection for
pointer type for G_ICMP and G_SELECT?
Using G_INTTOPTR/G_PTRTOINT when pointer operands appear in G_ICMP and
G_SELECT in irtranslator could also be an option.
Regards,
Petar
More information about the llvm-dev
mailing list