<div dir="ltr">Thanks Sander,<div><br></div><div>That is exactly what I needed! We will be working on a few patches for those patterns.</div><div><br></div><div>Best regards,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><span>Danilo Carvalho Grael</span></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 16, 2020 at 11:30 AM Sander De Smalen <<a href="mailto:Sander.DeSmalen@arm.com">Sander.DeSmalen@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Danilo,<br>
<br>
Thanks for following this up.<br>
<br>
The IR instructions to codegen are unpredicated, where most SVE instructions are predicated, so in D71712 you can see we've had to patterns that map these nodes to predicated instructions (see for example defm: unpred_from_pred_one_op_fp<fabs, ...>). In trunk we don't really want to solve it the same way as in D71712, because we'd rather generate the predicate patterns in ISelLowering by custom lowering the operation to an AArch64ISD node that takes a predicate. This way the patterns themselves are trivial and we don't need to add new patterns when adding codegen for fixed-width vectors (these will use the same patterns, same types and the same AArch64ISD nodes, but a different predicate value). The patterns to add are for the following types:<br>
- nxv2f16, nxv4f16, nxv8f16<br>
- nxv2f32, nxv4f32<br>
- nxv2f64<br>
<br>
We've already done this type of custom lowering for several nodes, see for example the uses of `AArch64TargetLowering::LowerToPredicatedOp()` in trunk.<br>
<br>
For illegal vectors there will also some work needed for the code that legalizes illegal types. For example, SplitVecOp_FP_ROUND currently drops the 'scalable' flag of the result vector when it tries to legalize it. There may be other cases like this as well.<br>
<br>
A good starting point is probably the patterns we've added for the FP nodes in D71712 if you search for `unpred_from_pred_.*_fp`.<br>
<br>
Hope that helps!<br>
<br>
Cheers,<br>
<br>
Sander<br>
> On 15 Jun 2020, at 19:53, Danilo Carvalho Grael <<a href="mailto:dancgr@gmail.com" target="_blank">dancgr@gmail.com</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> I am following up on the issue discussed at the SVE meeting, Sander mentioned that there were some patterns missing from SVE CodeGen for floating point operations, but I was unable to identify them.<br>
> <br>
> He mentioned something about looking at the ISelLowering for AArch64 to identify them, so if there is any information of that regard it would be greatly appreciated so we can contribute with the missing patterns that will be required later on when fixed-width vectors are implemented.<br>
> <br>
> Best regards,<br>
> Danilo Carvalho Grael<br>
<br>
</blockquote></div>