[PATCH] D126540: PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions

Maryam Moghadas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 20:21:09 PDT 2022


maryammo added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:7723
+
+  if (SrcTy->isVectorType()) {
+    VectorType::VectorKind SrcVecKind =
----------------
maryammo wrote:
> lei wrote:
> > do we really need this check since we have an assert above?
> Yes, without this check there is gonna be a compile time failure for cases where SrcTy is not vector but we wanna cast it to vector 'SrcTy->castAs<VectorType>()' 
the assert checks of either of them is a vector but then we wanna check if at least one of them is altivec. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126540



More information about the cfe-commits mailing list