Displaying 5 results from an estimated 5 matches for "isscalartype".
2018 Nov 27
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...(G_TRUNC s16:$D, s32:$t1)),
(apply (G_ZEXT s16:$D, s8:$S))>;
def : GICombineRule<(defs reg:$D, reg:$S),
(match (G_ZEXT $t1, $S),
(G_TRUNC $D, $t1),
(isScalarType type:$D),
(isLargerType type:$D, type:$S)),
(apply (G_ZEXT $D, $S))>;
def : GICombineRule<(defs reg:$D, reg:$S, instr:$MI0, instr:$MI1),
(match (G_ZEXT $t0, $S):$MI0,
(G_TRUNC $D,...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...def : GICombineRule<(defs reg:$D, reg:$S),
>> (match (G_ZEXT s32:$t1, s8:$S),
>> (G_TRUNC s16:$D, s32:$t1)),
>> (apply (G_ZEXT s16:$D, s8:$S))>;
>> def : GICombineRule<(defs reg:$D, reg:$S),
>> (match (G_ZEXT $t1, $S),
>> (G_TRUNC $D, $t1),
>> (isScalarType type:$D),
>> (isLargerType type:$D, type:$S)),
>> (apply (G_ZEXT $D, $S))>;
>> def : GICombineRule<(defs reg:$D, reg:$S, instr:$MI0, instr:$MI1),
>> (match (G_ZEXT $t0, $S):$MI0,
>> (G_TRUNC $D, $t0):$MI1),
>> (isScalarType type:$D),
>> (isLargerType...
2018 Nov 27
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...email as I suspect I'm over the size limit again. The bit I need to mention in this email is that the formerly anonymous operands are omitted from the defs section in these examples.
Generalizing the Simple Example
As before, this is the example above with the concrete types removed.
def isScalarType : GIMatchPredicate<bool, (ins type:$A), (outs), [{
return ${A}.isScalar();
}]>;
def isLargerType : GIMatchPredicate<bool, (ins type:$A, type:$B), (outs), [{
return ${A}.getSizeInBits() > ${B}.getSizeInBits();
}]>;
def : GICombineRule<(defs reg:$D, reg:$...
2018 Nov 12
3
[RFC] Tablegen-erated GlobalISel Combine Rules
> On Nov 10, 2018, at 03:28, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>
> Thank you for the detailed reply! There's a lot to digest :) Let me try to address most of it.
>
>
> [snip]
>>> I also think you should have 'ins' and 'outs' separately; after all, a predicate may have to do a combined check on two matched registers / operands,
2018 Nov 09
5
[RFC] Tablegen-erated GlobalISel Combine Rules
...both be the case is if %1 is a a scalar of at least s17. We're still not covering every type combination that we ought to though since %S and %D are still restricted to s8 and s16 respectively. To fix this, we'll need some custom predicates.
A custom predicate is declared like so:
def isScalarType : GIMatchPredicate<(ins type:$A), bool, [{
return ${A}.isScalar();
}]>;
this declares that the predicate takes a type (LLT) named A and returns a bool. It also declares the code used to test the predicate and the place that the variable for A must be inserted. We can potentially use...