================
@@ -11302,6 +11303,35 @@ static bool handleVectorElementCast(EvalInfo &Info,
const FPOptions FPO,
return false;
}
+bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
+ if (!IsConstantEvaluatedBuiltinCall(E))
+ return ExprEvaluatorBaseTy::VisitCallExpr(E);
+
+ switch (E->getBuiltinCallee()) {
+ default:
+ return false;
+ case Builtin::BI__builtin_elementwise_popcount: {
+ APValue Source;
+ if (!EvaluateAsRValue(Info, E->getArg(0), Source))
+ return false;
+
+ QualType DestTy = E->getType()->castAs<VectorType>()->getElementType();
----------------
Fznamznon wrote:
Perhaps makes sense to highlight that it is an element type so it is easier to
understand what is going on from the brief look.
```suggestion
QualType DestEltTy = E->getType()->castAs<VectorType>()->getElementType();
```
https://github.com/llvm/llvm-project/pull/117473
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits