[clang] [CIR][AArch64] Upstream addition NEON builtins (PR #202005)

Vicky Nguyen via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 21:08:01 PDT 2026


================
@@ -664,12 +664,20 @@ static mlir::Value emitCommonNeonBuiltinExpr(
     ops[0] = cgf.getBuilder().createBitcast(loc, ops[0], vTy);
     return emitNeonSplat(cgf.getBuilder(), loc, ops[0], ops[1], numElements);
   }
+  case NEON::BI__builtin_neon_vadd_v:
+  case NEON::BI__builtin_neon_vaddq_v: {
+    unsigned numBytes = (builtinID == NEON::BI__builtin_neon_vaddq_v) ? 16 : 8;
+    cir::VectorType byteTy =
+        cir::VectorType::get(cgf.getBuilder().getUInt8Ty(), numBytes);
+    ops[0] = cgf.getBuilder().createBitcast(ops[0], byteTy);
+    ops[1] = cgf.getBuilder().createBitcast(ops[1], byteTy);
----------------
iamvickynguyen wrote:

Actually, I've included the polynomial-addition lowering and the tests in this PR. Hope you don't mind :smile: 

https://github.com/llvm/llvm-project/pull/202005


More information about the cfe-commits mailing list