[PATCH] D120571: [CGP, AArch64] Replace zexts with shuffle that can be lowered using tbl.

Aaron Puchert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 15:49:11 PDT 2022


aaronpuchert added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13189-13191
+  auto *SrcTy = dyn_cast<FixedVectorType>(Op->getType());
+  auto *DstTy = dyn_cast<FixedVectorType>(ZExt->getType());
+  unsigned NumElts = SrcTy->getNumElements();
----------------
The static analyzer finds this [suspicious](https://llvm.org/reports/scan-build/report-AArch64ISelLowering.cpp-createTblShuffleForZExt-4-6b10d0.html#EndPath): `SrcTy` is the result of a `dyn_cast`, but is unconditionally dereferenced. Perhaps it should be a `cast`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120571/new/

https://reviews.llvm.org/D120571



More information about the llvm-commits mailing list