search for: imm_2

Displaying 5 results from an estimated 5 matches for "imm_2".

Did you mean: imm32
2018 Nov 27
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...local:$MI2, debug_expr:$DNewExpr, (debug_location $MI2)), (DBG_VALUE $D, debug_local:$MI3, debug_expr:$MI3, (debug_location $MI3))))>; // $VAL is needed to indicate it's an immediate and provide the predicate def : GICombineRule<(defs reg:$D, reg:$A, imm_2:$VAL), (match (G_MUL $D, $A, $VAL)), (apply (MYTGT_DOUBLE $D, $A))>; // $B/$C are needed to indicate they're immediates and provide $C's predicate def : GICombineRule< (defs reg:$D, reg:$A, imm:$B, imm_2:$C), (match (...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...$DNewExpr, (debug_location $MI2)), >> (DBG_VALUE $D, debug_local:$MI3, debug_expr:$MI3, (debug_location $MI3))))>; >> // $VAL is needed to indicate it's an immediate and provide the predicate >> def : GICombineRule<(defs reg:$D, reg:$A, imm_2:$VAL), >> (match (G_MUL $D, $A, $VAL)), >> (apply (MYTGT_DOUBLE $D, $A))>; >> // $B/$C are needed to indicate they're immediates and provide $C's predicate >> def : GICombineRule< >> (defs reg:$D, reg:$A, imm:$B, imm_2:$C), >> (match (G_ADD $t1,...
2018 Nov 27
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...on. Rewriting the examples into the DAG style gives: def : GICombineRule<(defs reg:$D, reg:$A, imm:$VAL), (match (G_MUL $D, $A, $VAL), (isTwo imm:$VAL)), (apply (MYTGT_DOUBLE $D, $A))>; Or equivalently: def imm_2 : GIPredicatedDefKind<(isTwo imm)>; def : GICombineRule<(defs reg:$D, reg:$A, imm_2:$VAL), (match (G_MUL $D, $A, $VAL)), (apply (MYTGT_DOUBLE $D, $A))>; And here's the example that replaces 2 * (A + B) with 2A + 2B: def : GICo...
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
...], (isTwo imm:$VAL)), (apply [{MIR %root = MYTGT_DOUBLE %A }])>; Listing the C++ predicates like that will lead to a lot of repetitive and bug-prone code so it will also be possible to embed the predicates in custom variants of imm. def imm_2 : GIPredicatedDefKind<(isTwo imm)>; def : GICombineRule<(defs root:$D, reg:$A, imm_2:$VAL), (match [{MIR %D = G_MUL %A, %VAL }]) (apply [{MIR %root = MYTGT_DOUBLE %A }])>; These are effectively appended to the match section. Just matc...