This is an archive of the discontinued LLVM Phabricator instance.

[x86][AMX] Support undef and zeroinitializer for x86_amx
Needs ReviewPublic

Authored by yubing on Sep 16 2021, 11:17 PM.

Details

Summary

x86_amx(undef, zeroinitializer) can't be created from source file since x86_amx can only be created when we are using amx intrinsics. So the feature can only work on self-created IR for now.

Diff Detail

Event Timeline

yubing created this revision.Sep 16 2021, 11:17 PM
yubing requested review of this revision.Sep 16 2021, 11:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2021, 11:17 PM
yubing edited the summary of this revision. (Show Details)Sep 16 2021, 11:21 PM
yubing updated this revision to Diff 373166.Sep 17 2021, 1:36 AM

Solve the lit testcases fail

xiangzhangllvm added inline comments.Sep 17 2021, 5:06 AM
llvm/lib/IR/Verifier.cpp
4603–4606

I think we can remove this code, it is strange here.

llvm/lib/Target/X86/X86LowerAMXType.cpp
308

This way is finding which operand is amx null/undef, then create a tilezero to replace the operand.
here may be create a lot of tilezeros.

I think here must be a better way to do it.

e.g. From the value side, replace all of uses of it.

Matt added a subscriber: Matt.Oct 2 2021, 6:25 AM