This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Asm: Support for LDR/STR fill and spill instructions.
ClosedPublic

Authored by sdesmalen on Apr 30 2018, 9:27 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

sdesmalen created this revision.Apr 30 2018, 9:27 AM

Hi Sander,

The new instruction classes have a lot of overlap, I think it would be nicer to refactor them and pass more than asm string as an argument.

cheers,
sam

The new instruction classes have a lot of overlap, I think it would be nicer to refactor them and pass more than asm string as an argument.

Hi Sam, there are two reasons I didn't merge these into the same instruction classes for this patch...
One is that we chose to structure the file by the encoding groups from the SVE specification and merge instruction classes only when they are in the same group (e.g. {z_fill, p_fill} are in a different group from {z_spill, p_spill}). This is a bit of a trade-off where we choose to keep the instruction classes simpler and easier to look up from the spec, as opposed to minimising the lines of code. The other reason is that merging e.g. z_fill and p_fill - both in the same encoding group - is not very convenient because they have different encodings for their operands (e.g. 5-bits Zt vs 4-bits Pt) and also different operands (ZPRAny vs PPRAny). I think it doesn't make it easier to read if we are to template these cases.
Does that make sense?

samparker accepted this revision.May 1 2018, 8:47 AM

I had missed that the output operands where not the same, indeed it's not convenient and readability is also a valid reason.

LGTM.

This revision is now accepted and ready to land.May 1 2018, 8:47 AM
This revision was automatically updated to reflect the committed changes.