This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add multiclass for bfloat16 intrinsic definitions
Needs ReviewPublic

Authored by c-rhodes on Jun 24 2020, 4:05 AM.

Details

Summary

Patch implements a multiclass 'SInstBF16', a wrapper around SInst that
also defines a bfloat16 variant. This is used to merge the definitions
of intrinsics with bfloat16 support. The multiclass also handles
multiple arch guards.

Diff Detail

Event Timeline

c-rhodes created this revision.Jun 24 2020, 4:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2020, 4:05 AM
sdesmalen added inline comments.Jun 24 2020, 5:23 AM
clang/include/clang/Basic/arm_sve.td
264

I'd rather see that we define ArchGuard as a list of strings, and then do a simple !listconcat for each of the features. Then we can do the expansion to the eventual #if defined (pred1 && pred2 && ... predN) in SveEmitter.cpp. There you can get the ArchGuard as a std::vector<StringRef>.

I also think the current implementation isn't correct, because it misses the encapsulating defined(...) ?