Displaying 4 results from an estimated 4 matches for "clampscalar".
2020 Mar 25
2
[GlobalISel] Narrowing uneven/non-pow-2 types
...equires 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 say `clampScalar` and let the legalizer handle the rest, even if it...
2018 Sep 14
2
[GlobalISel][MIPS] Legality and instruction combining
Hi Daniel,
On 13.09.2018. 19:32, Daniel Sanders wrote:
> Could you clarify what you mean here? The new legalizer info can
> define this with:
> getActionDefinitionsBuilder(G_SELECT).clampScalar(1, s32, s32)
> so I'm guessing you mean that code to mutate the G_SELECT is currently
> missing
Yes, LegalizerHelper::widenScalar widens only TypeIdx==0, it doesn't do
that for TypeIdx==1. Is it intentionally implemented this way?
>> b) Is the plan to sometimes let s1 as legal...
2020 Mar 24
3
[GlobalISel] Narrowing uneven/non-pow-2 types
...d 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 say `clampScalar`
and let the legalizer handle the rest, even if it requires exte...
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".