search for: widenscalartonextpow2

Displaying 4 results from an estimated 4 matches for "widenscalartonextpow2".

2018 Sep 14
2
[GlobalISel][MIPS] Legality and instruction combining
...gt;> b) Is the plan to sometimes let s1 as legal type and ignore it later? > I'm not sure what you mean here > For example lets look at AArch64 G_SELECT:   getActionDefinitionsBuilder(G_SELECT)       .legalFor({{s32, s1}, {s64, s1}, {p0, s1}})       .clampScalar(0, s32, s64)       .widenScalarToNextPow2(0); In this case LLT of operand 1 (s1) in G_SELECT has size 1, and corresponding register class in selected instruction has size 32 (that is $src1 in AArch64::ANDSWri, it has GPR32 regsiter class). For that reason s1 is practically ignored and silently converted to s32. We could get similar resu...
2020 Mar 25
2
[GlobalISel] Narrowing uneven/non-pow-2 types
...ould not be narrowed because the narrowing code relies on G_UNMERGE_VALUES and therefore requires the source type to be a multiple of the narrow type. Often times these instructions can be widened without any problem to a fitting type. >> >> This has us writing legalization rules like `.widenScalarToNextPow2(0, /*MinSize*/ 32).maxScalar(0, s32)` instead of the much simpler `.clampScalar(0, s32 ,s32)`. >> >> Although this works and has the desired effect, we feel like that such a rule requires internal knowledge of the legalizer, which can change at any point in the future. Ideally we would...
2020 Mar 24
3
[GlobalISel] Narrowing uneven/non-pow-2 types
...instructions could not be narrowed because the narrowing code relies on G_UNMERGE_VALUES and therefore requires the source type to be a multiple of the narrow type. Often times these instructions can be widened without any problem to a fitting type. This has us writing legalization rules like `.widenScalarToNextPow2(0, /*MinSize*/ 32).maxScalar(0, s32)` instead of the much simpler `.clampScalar(0, s32 ,s32)`. Although this works and has the desired effect, we feel like that such a rule requires internal knowledge of the legalizer, which can change at any point in the future. Ideally we would only want to...
2018 Sep 13
2
[GlobalISel][MIPS] Legality and instruction combining
Hello, I am developing GlobalISel for MIPS. I have a few questions and observations about defining legality of generic instruction and also possible combining of instructions and artifacts in pre/post legalizer combiner or elsewhere (e.g. in some sort of instruction-select patterns). I look at legality as "If generic instruction can be selected into machine instruction, it is legal".