This patch adds support for the conditional (ternary) operator on SVE
scalable vector types in C++, matching the behaviour for NEON vector
types. Like the conditional operator for NEON types, this is disabled in
C mode.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaExprCXX.cpp | ||
---|---|---|
6266 | I get an assert with the following input (float64 in, float32 out). I was lead here by noticing that the element count comes from CondElementCount, but nothing ensures that the numbers of elements are consistent with LHS or RHS. svfloat32_t cond_f32_splat(svfloat64_t a) { return a < 0. ? 1.f : 0.f; } #11 0x0000000001fef77e clang::ASTContext::getCanonicalType(clang::QualType) const CodeGenTypes.cpp:0:0 #12 0x000000000446b39c clang::Sema::ImpCastExprToType(clang::Expr*, clang::QualType, clang::CastKind, clang::ExprValueKind, llvm::SmallVector<clang::CXXBaseSpecifier*, 4u> const*, clang::Sema::CheckedCo nversionKind) (out/rel/bin/clang+0x446b39c) #13 0x00000000048ca1ce clang::Sema::CheckSizelessVectorConditionalTypes(clang::ActionResult<clang::Expr*, true>&, clang::ActionResult<clang::Expr*, true>&, clang::ActionResult<clang::Expr*, true>&, clan g::SourceLocation) (out/rel/bin/clang+0x48ca1ce) |
I think that this has caused assert failures on the VLS (fixed sized vector) SVE bot.
https://lab.llvm.org/buildbot/#/builders/176/builds/1632/steps/12/logs/stdio
Based on the other SVE change being in llvm and seeing Sema in the backtrace.
These issues are not on any of the other AArch64 bots or the vector length agnostic bot. I appreciate that I'm pulling your change out of a list of 80 without that much evidence so if it's clearly not the issue just let me know.
I appreciate that I'm pulling your change out of a list of 80 without that much evidence so if it's clearly not the issue just let me know.
My guess was incorrect, I've tracked this down to a different change. Sorry for the noise.
I get an assert with the following input (float64 in, float32 out). I was lead here by noticing that the element count comes from CondElementCount, but nothing ensures that the numbers of elements are consistent with LHS or RHS.