This is an archive of the discontinued LLVM Phabricator instance.

[X86][AMX] set Stride to Tile's Col when doing combine amxcast and store into tilestore
ClosedPublic

Authored by yubing on Jun 15 2023, 1:29 AM.

Details

Summary

%tile = call x86_amx @llvm.x86.tileloadd64.internal(i16 8, i16 32, i8* %src_ptr, i64 64)
%vec = call <256 x i8> @llvm.x86.cast.tile.to.vector.v256i8(x86_amx...%tile)
store <256 x i8> %vec, <256 x i8>* %dst_ptr, align 256

>

%tile = call x86_amx @llvm.x86.tileloadd64.internal(i16 8, i16 32, i8* %src_ptr, i64 64)
%stride = sext i16 32 to i64
call void @llvm.x86.tilestored64.internal(i16 8, i16 32, i8* %dst_ptr, i64 32, x86_amx %tile)

Diff Detail

Event Timeline

yubing created this revision.Jun 15 2023, 1:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 1:29 AM
yubing requested review of this revision.Jun 15 2023, 1:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 1:29 AM
yubing retitled this revision from [X86][AMX] set Stride to Tile's Col when doing combine amxcast and store into tilestore: %tile = call x86_amx @llvm.x86.tileloadd64.internal(i16 8, i16 32, i8* %src_ptr, i64 64) %vec = call <256 x i8> @llvm.x86.cast.tile.to.vector.v256i8(x86_amx... to [X86][AMX] set Stride to Tile's Col when doing combine amxcast and store into tilestore.Jun 15 2023, 1:30 AM
yubing edited the summary of this revision. (Show Details)
yubing added reviewers: LuoYuanke, pengfei.
yubing planned changes to this revision.Jun 15 2023, 2:07 AM
yubing updated this revision to Diff 532566.Jun 19 2023, 1:59 AM

do it for amxcast&load as well

LuoYuanke added inline comments.Jun 19 2023, 2:22 AM
llvm/test/CodeGen/X86/AMX/amx-combine.ll
145

Could you add comments in the amx-cast definition that the vector size can be smaller than AMX register size (1024 bytes)? I think vector size can NOT be larger than AMX register size, am I right?

yubing updated this revision to Diff 532773.Jun 19 2023, 6:39 PM

add comments

This revision is now accepted and ready to land.Jun 19 2023, 6:41 PM