This is an archive of the discontinued LLVM Phabricator instance.

[ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4.
AbandonedPublic

Authored by hgreving on May 5 2022, 8:59 AM.

Details

Reviewers
None
Summary

Adds MVT::v128i2, MVT::v64i4, and implied MVT::i2, MVT::i4 to support
for downstream targets. i2, i4 are _not_ added as integer types, but
as generic value types. In the future, they should become first class
integer types, but this requires more support in selection DAG.

Diff Detail

Event Timeline

hgreving created this revision.May 5 2022, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 8:59 AM
hgreving requested review of this revision.May 5 2022, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 8:59 AM
hgreving updated this revision to Diff 427400.May 5 2022, 11:23 AM
hgreving updated this revision to Diff 427782.May 6 2022, 4:06 PM
hgreving edited the summary of this revision. (Show Details)

What SelectionDAG support is needed for i2/i4?

llvm/include/llvm/CodeGen/ValueTypes.td
29

Don't change this formatting

llvm/utils/TableGen/CodeGenTarget.cpp
59

Keep the formatting consistent with existing code

96

Same here

What SelectionDAG support is needed for i2/i4?

Thanks for asking! I ran into various issues when adding i2/i4 as integer types, starting with them being assumed "legal" in selection DAG with various lit tests failingthat rely on expansion. Followed by more issues due to sth in DAG combine, which I hadn't tracked down completely. Any thoughts on that?

hgreving updated this revision to Diff 427787.May 6 2022, 4:29 PM
hgreving updated this revision to Diff 427788.May 6 2022, 4:35 PM
hgreving marked an inline comment as done.
hgreving added inline comments.
llvm/utils/TableGen/CodeGenTarget.cpp
59

Sorry my clang-format did that, need to check my upstream setup.

hgreving updated this revision to Diff 427803.May 6 2022, 5:50 PM
hgreving updated this revision to Diff 427806.May 6 2022, 6:29 PM
hgreving abandoned this revision.May 7 2022, 7:50 AM

Abandoning, may try the integer route or check the sel DAG failures more closely.