[PATCH] D147921: [X86][AMX] Add check for potentially dereferencing null return value
Bing Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 02:10:53 PDT 2023
yubing added inline comments.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:491
if (IsPHI) {
- Value *PhiOp = dyn_cast<PHINode>(V)->getIncomingValue(0);
+ Value *PhiOp = cast<PHINode>(V)->getIncomingValue(0);
II = cast<IntrinsicInst>(PhiOp);
----------------
xiangzhangllvm wrote:
> Make sense for type check, but any bug meet by previous code?
i don't know if there is a bug, i just observe a potential dereferencing null return value
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147921/new/
https://reviews.llvm.org/D147921
More information about the llvm-commits
mailing list