[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)
Lei Huang via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 09:37:28 PST 2026
================
@@ -114,6 +114,36 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo &TI,
return Diag(TheCall->getBeginLoc(), diag::err_64_bit_builtin_32_bit_tgt)
<< TheCall->getSourceRange();
+ // Common BCD type-validation helpers
+ // Emit error diagnostics and return true on success
+ // - IsVectorType: enforces vector unsigned char
+ // - IsIntType: enforces any integer type
+ // Lambdas centralize type checks for BCD builtin handlers
+
+ // Lambda 1: verify vector unsigned char type
+ auto IsVectorType = [&](QualType ArgTy, unsigned ArgIndex) -> bool {
----------------
lei137 wrote:
nit: lambda name should be more specific to your check. eg `IsTypeVecUChar()`
https://github.com/llvm/llvm-project/pull/154715
More information about the cfe-commits
mailing list