Page MenuHomePhabricator

[SveEmitter] Add immediate checks for lanes and complex imms
ClosedPublic

Authored by sdesmalen on Mar 24 2020, 2:00 AM.

Details

Summary

Adds another bunch of of intrinsics that take immediates with
varying ranges based, some being a complex rotation immediate
which are a set of allowed immediates rather than a range.

svmla_lane:   lane immediate ranging 0..(128/(1*sizeinbits(elt)) - 1)
svcmla_lane:  lane immediate ranging 0..(128/(2*sizeinbits(elt)) - 1)
svdot_lane:   lane immediate ranging 0..(128/(4*sizeinbits(elt)) - 1)
svcadd:       complex rotate immediate [90, 270]
svcmla:
svcmla_lane:  complex rotate immediate [0, 90, 180, 270]

Diff Detail

Event Timeline

sdesmalen created this revision.Mar 24 2020, 2:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 2:00 AM
Herald added a subscriber: tschuett. · View Herald Transcript

Looks good to me, but just one question about the tests. If I haven't overlooked anything, I don't see tests that check the new diagnostics:
"argument should be the value 90 or 270"
"argument should be the value 0,90,180 or 270"

Should they be here, or are they somewhere else?

clang/include/clang/Basic/DiagnosticSemaKinds.td
9244

A proper nit, perhaps some spaces here: "0,90,180".

Looks good to me, but just one question about the tests. If I haven't overlooked anything, I don't see tests that check the new diagnostics:
"argument should be the value 90 or 270"
"argument should be the value 0,90,180 or 270"

Should they be here, or are they somewhere else?

Good point, I seem to have forgotten to add these tests. I'll update the patch!

sdesmalen updated this revision to Diff 255282.Apr 6 2020, 4:01 AM
  • Updated tests.
efriedma added inline comments.Apr 6 2020, 2:02 PM
clang/include/clang/Basic/DiagnosticSemaKinds.td
9244

Still not done?

sdesmalen updated this revision to Diff 255500.Apr 6 2020, 2:53 PM
  • Addressed comments - added spaces to 0, 90, 180 or 270
sdesmalen marked 3 inline comments as done.Apr 6 2020, 2:53 PM
sdesmalen added inline comments.
clang/include/clang/Basic/DiagnosticSemaKinds.td
9244

Sorry, I forgot about that earlier. Should be fixed now.

efriedma accepted this revision.Apr 6 2020, 4:43 PM

LGTM

This revision is now accepted and ready to land.Apr 6 2020, 4:43 PM
This revision was automatically updated to reflect the committed changes.
sdesmalen marked an inline comment as done.