Displaying 5 results from an estimated 5 matches for "legalfor".
2018 Sep 14
2
[GlobalISel][MIPS] Legality and instruction combining
...it doesn't do
that for TypeIdx==1. Is it intentionally implemented this way?
>> 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).
F...
2020 Mar 25
2
[GlobalISel] Narrowing uneven/non-pow-2 types
...rose because we are seeing the following LLVM-IR,
which we cannot legalize with our current legalization rules:
%6 = zext i32 %5 to i33
%7 = zext i32 %0 to i33
%8 = mul i33 %6, %7
%9 = lshr i33 %8, 1
%10 = trunc i33 %9 to i32
getActionDefinitionsBuilder(G_MUL)
.legalFor({s32})
.clampScalar(0, s32, s32);
getActionDefinitionsBuilder(G_LSHR)
.legalFor({{s32, s32}})
.clampScalar(1, s32, s32)
.clampScalar(0, s32, s32);
We would be able to legalize the above code if we just add a
widenScalarToNextPow2 before the clampScalar in both case...
2020 Mar 24
3
[GlobalISel] Narrowing uneven/non-pow-2 types
Hi all,
recently when working with GlobalISel we have often encountered cases in
the legalizer where 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
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".
2020 Oct 07
2
GlobalISel round table follow-up: multi-stage legalization
Hi all,
first of all thanks to Matt for hosting the round table yesterday and to
everyone else for their time and the valuable discussions. As promised
in the chat yesterday, here is the email regarding the legalizer /
artifact combiner issue we talked about. I will send a separate email
regarding the regbankselect discussion.
In case someone on the list didn't attend the round table