[PATCH] D143210: [PowerPC] Include vector bool and pixel when emitting lax warning
Maryam Moghadas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 15 12:27:06 PST 2023
maryammo added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:9845
if (anyAltivecTypes(RHSType, LHSType) &&
- !areSameVectorElemTypes(RHSType, LHSType))
+ !Context.areCompatibleVectorTypes(RHSType, LHSType))
Diag(RHS.get()->getExprLoc(), diag::warn_deprecated_lax_vec_conv_all)
----------------
amyk wrote:
> Might be a silly question, but what does it mean to be a "compatible" vector type?
`areCompatibleVectorTypes` is defined in lib/AST/ASTContext.cpp, it considers all vectors with the same unqualified types to be compatible, also vectors with the same number of elements where neither of them is vector bool/pixel or some specific SVE types are compatible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143210/new/
https://reviews.llvm.org/D143210
More information about the cfe-commits
mailing list