================ @@ -19594,23 +19750,45 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) { TheCall->setArg(0, A.get()); QualType TyA = A.get()->getType(); - if (checkMathBuiltinElementType(*this, A.get()->getBeginLoc(), TyA)) + if (checkMathBuiltinElementType(*this, A.get()->getBeginLoc(), TyA, 1)) return true; TheCall->setType(TyA); return false; } bool Sema::SemaBuiltinElementwiseMath(CallExpr *TheCall) { + QualType Res; + bool result = SemaBuiltinVectorMath(TheCall, Res); + if (result) + return true; + TheCall->setType(Res); + return false; +} + +bool Sema::SemaBuiltinVectorToScalarMath(CallExpr *TheCall) { + QualType Res; + bool result = SemaBuiltinVectorMath(TheCall, Res); + if (result) + return true; + + if (auto *VecTy0 = Res->getAs<VectorType>()) { + TheCall->setType(VecTy0->getElementType()); + } else { + TheCall->setType(Res); + } ---------------- llvm-beanz wrote:
Unnecessary braces. See: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements https://github.com/llvm/llvm-project/pull/81190 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits