This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME]: Generate streaming-compatible code for int-minmax, fp-minmax
ClosedPublic

Authored by hassnaa-arm on Nov 18 2022, 5:51 AM.

Details

Summary

1-To generate code compatible to streaming mode:

  • enable custom lowering for SMIN, SMAX, UMIN, UMAX, FMAXNUM, FMINNUM, FMAXIMUM, FMINIMUM.

2-Testing files:

  • int-minmax.ll
  • fp-minmax.ll

Diff Detail

Event Timeline

hassnaa-arm created this revision.Nov 18 2022, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 5:51 AM
hassnaa-arm requested review of this revision.Nov 18 2022, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 5:51 AM
sdesmalen added inline comments.Nov 21 2022, 9:46 AM
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-minmax.ll
257

All the tests with vscale_range(2, 0) can be removed, because these are already tested in the regular fixed-width test file.

Remove vscale_range.

hassnaa-arm marked an inline comment as done.Nov 22 2022, 3:09 AM
sdesmalen added inline comments.Nov 22 2022, 8:11 AM
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-minmax.ll
257

I didn't realise all tests in this file had vscale_range(2, 0), but if you remove them, please remove the attributes from the patch that adds this file.

When I left my first comment, my thinking was that there wasn't much value in this particular test, because it's behaviour was already tested by sve-fixed-length-int-minmax.ll, but at second glance there may be value because it should now be testing legalisation.

259–261

Did you forget to regenerate the tests? I would have expected different code after removing the vscale_range attribute, as it would require at least two smin operations for legalisation reasons.

hassnaa-arm marked an inline comment as done.Nov 22 2022, 8:59 AM
hassnaa-arm added inline comments.
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-minmax.ll
259–261

yes, sorry, I forgot to regenerate it.

hassnaa-arm marked an inline comment as done.

Regenerate tests after removing scale_range

Matt added a subscriber: Matt.Nov 22 2022, 11:00 AM
This revision is now accepted and ready to land.Nov 23 2022, 2:22 AM

Remove vscale_range from the precursory patch

hassnaa-arm edited the summary of this revision. (Show Details)Nov 23 2022, 3:48 AM

rerun the tests after removing vscale_range in the precursory patch