search for: g_sextload

Displaying 8 results from an estimated 8 matches for "g_sextload".

2018 Nov 10
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...le. I haven't defined one yet, but I don't see any reason we couldn't define non-operands in a similar way. >> _Macros_ >> _ >> _ >> I simplified the previous example a bit. Rather than only matching a G_LOAD, the current rule in AArch64 can match any of G_LOAD, G_SEXTLOAD, and G_ZEXTLOAD. We need some means to match one of several alternatives as well as collect and re-use common subpatterns. I've yet to look into how this would be practically implemented and this section is a bit vague as a result but here's the current thinking on how it should look and be...
2018 Nov 09
5
[RFC] Tablegen-erated GlobalISel Combine Rules
...ntirety of the replacement so we escape into arbitrary C++ instead and arrange for the variables to be injected appropriately using the 'exec' operator. Macros I simplified the previous example a bit. Rather than only matching a G_LOAD, the current rule in AArch64 can match any of G_LOAD, G_SEXTLOAD, and G_ZEXTLOAD. We need some means to match one of several alternatives as well as collect and re-use common subpatterns. I've yet to look into how this would be practically implemented and this section is a bit vague as a result but here's the current thinking on how it should look and be...
2018 Nov 27
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...hinfo)>; // I haven't included any rules for omitting defs from GIMacro but I can look into this if we want. def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), (match (oneof (match (G_LOAD $R, $S)), (match (G_SEXTLOAD $R, $S)), (match (G_ZEXTLOAD $R, $S))):$IDX>; // $ANYLOAD is needed to import the macro and name its instance def extending_loads : GICombineRule< (defs reg:$D, reg:$A, extending_load_matchdata:$matchinfo, ANYLOAD:$ANYLOAD), (match (...
2018 Nov 12
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...ying algorithm gains support for this, this is how the syntax would look: >>>> def : GICombineRule< >>>> (defs root:$root, reg:$A), >>>> (match [{MIR %1 = G_LOAD %root >>>> %A = G_SEXT %1 }]), >>>> (apply [{MIR %A = G_SEXTLOAD %root }])>; >>>> The only unusual thing about this rule is that the root isn't at the bottom. Instead of starting at a use and matching towards defs, we're starting at the def and matching towards uses. This has some potentially useful properties. The combine algorithm has to...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...$D, extending_load_matchdata:$matchinfo)>; >> // I haven't included any rules for omitting defs from GIMacro but I can look into this if we want. >> def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), >> (match (oneof (match (G_LOAD $R, $S)), >> (match (G_SEXTLOAD $R, $S)), >> (match (G_ZEXTLOAD $R, $S))):$IDX>; >> // $ANYLOAD is needed to import the macro and name its instance >> def extending_loads : GICombineRule< >> (defs reg:$D, reg:$A, extending_load_matchdata:$matchinfo, ANYLOAD:$ANYLOAD), >> (ma...
2018 Nov 27
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...checking on 'dag' compared to 'list<X>' allows us to freely mix DAG-style matches and predicates. def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), (match (oneof (match (G_LOAD $R, $S)), (match (G_SEXTLOAD $R, $S)), (match (G_ZEXTLOAD $R, $S))):$IDX>; def extending_loads : GICombineRule< (defs reg:$D, reg:$A, extending_load_matchdata:$matchinfo, ANYLOAD:$ANYLOAD), (match (ANYLOAD $D, $A), (extending_load_predicate operand:$A,...
2018 Sep 13
2
[GlobalISel][MIPS] Legality and instruction combining
...e xor (or into movn with but we need to swap true and false register)).  If we select icmp and select independently we could end up with an extra xor instruction. I ask this question since combination of G_LOAD and G_SEXT  %1:_(s8) = G_LOAD %0(p0)  %2:_(s32) = G_SEXT %1(s8) will be replaced with G_SEXTLOAD in upcoming combiner. And if we let  %1:_(s8) = G_LOAD %0(p0) to be legal, we could select G_SEXT into G_LOAD (going bottom up) into sign extending load of appropriate size in instruction-select. Best regards, Petar   -------------- next part -------------- An HTML attachment was scrubbed... URL:...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...ompared to 'list<X>' allows us to freely mix DAG-style matches and predicates. >> def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), >> (match (oneof (match (G_LOAD $R, $S)), >> (match (G_SEXTLOAD $R, $S)), >> (match (G_ZEXTLOAD $R, $S))):$IDX>; >> def extending_loads : GICombineRule< >> (defs reg:$D, reg:$A, extending_load_matchdata:$matchinfo, ANYLOAD:$ANYLOAD), >> (match (ANYLOAD $D, $A), >>...