[PATCH] D112001: [Clang] Add min/max reduction builtins.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 05:25:46 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:16606-16609
+  const VectorType *VecTy = TyA->getAs<VectorType>();
+  if (!VecTy)
+    return Diag(A->getBeginLoc(), diag::err_elementwise_math_invalid_arg_type_2)
+           << "vector" << TyA;
----------------
What about type sugar?


================
Comment at: clang/lib/Sema/SemaChecking.cpp:16611
+
+  TheCall->setType(VecTy->getElementType());
+  return false;
----------------
Should this type undergo the usual conversions?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112001



More information about the cfe-commits mailing list