[llvm-dev] [GlobalISel] Predicated TImmLeafs in patterns
Dominik Montada via llvm-dev
llvm-dev at lists.llvm.org
Tue Nov 17 08:15:44 PST 2020
Hi,
I'm trying to use predicated TImmLeafs in TableGen patterns with
GlobalISel to select intrinsics with immediate operands. While this is
working so far, contrary to ImmLeafs the predicate does not seem to get
checked. Is this not supported yet?
This is the pattern in question:
def tuimm9 : TImmLeaf<i32, [{ return isUInt<9>(Imm); }]>;
def : Pat<(int_target_foo tuimm9:$mask), (FOO tuimm9:$mask)>;
Match table when using TImmLeaf:
GIM_CheckIsImm,
Match table when using ImmLeaf:
GIM_CheckOpcode, /*MI*/1, TargetOpcode::G_CONSTANT,
GIM_CheckI64ImmPredicate, /*MI*/1, /*Predicate*/GIPFP_I64_Predicate_uimm9,
Basically I'm wondering how I can make TableGen generate the
GIM_CheckI64ImmPredicate when using TImmLeafs.
Cheers,
Dominik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201117/546fc643/attachment.bin>
More information about the llvm-dev
mailing list