This is an archive of the discontinued LLVM Phabricator instance.

[SveEmitter] Add support for _n form builtins
ClosedPublic

Authored by sdesmalen on Apr 6 2020, 3:13 PM.

Details

Summary

The ACLE has builtins that take a scalar value that is to be expanded
into a vector by the operation. While the ISA may have an instruction
that takes an immediate or a scalar to represent this, the LLVM IR
intrinsic may not, so Clang will have to splat the scalar value.

This patch also adds the _n forms for svabd, svadd, svdiv, svdivr,
svmax, svmin, svmul, svmulh, svub and svsubr.

Diff Detail

Event Timeline

sdesmalen created this revision.Apr 6 2020, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 3:13 PM
Herald added a subscriber: tschuett. · View Herald Transcript
SjoerdMeijer accepted this revision.Apr 20 2020, 7:38 AM

Looks reasonable to me

clang/utils/TableGen/SveEmitter.cpp
213

"ajfrKLR" -> bingo ;-)

This probably makes sense, but who knows :-)
Not even sure if a comment makes things better here...

This revision is now accepted and ready to land.Apr 20 2020, 7:38 AM
sdesmalen marked an inline comment as done.Apr 22 2020, 6:37 AM
sdesmalen added inline comments.
clang/utils/TableGen/SveEmitter.cpp
213

"ajfrKLR" -> bingo ;-)

Haha! You are right these prototype modifiers are not very readable. The arm_sve.td file describes the prototype modifiers at the top though, and I've added a comment suggesting where to find it.

This revision was automatically updated to reflect the committed changes.