This is an archive of the discontinued LLVM Phabricator instance.

[X86][AMX] Add check for potentially dereferencing null return value
ClosedPublic

Authored by yubing on Apr 10 2023, 1:42 AM.

Diff Detail

Event Timeline

yubing created this revision.Apr 10 2023, 1:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 1:42 AM
yubing requested review of this revision.Apr 10 2023, 1:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 1:42 AM
yubing added a comment.EditedApr 10 2023, 1:45 AM

in fact if replaceWithTileLoad's IsPHI=true, U must be a PHINode's uses, V must be PHINode. i checked replacePhiDefWithLoad, replaceWithTileLoad's IsPHI=true, U is passed by a PHI's uses.

xiangzhangllvm added inline comments.Apr 10 2023, 2:08 AM
llvm/lib/Target/X86/X86LowerAMXType.cpp
491

Make sense for type check, but any bug meet by previous code?

xiangzhangllvm accepted this revision.Apr 10 2023, 2:08 AM
This revision is now accepted and ready to land.Apr 10 2023, 2:08 AM
yubing added inline comments.Apr 10 2023, 2:10 AM
llvm/lib/Target/X86/X86LowerAMXType.cpp
491

i don't know if there is a bug, i just observe a potential dereferencing null return value