================
@@ -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:
You're right! We don't have bit-casts in `neon_intrinsics.c` or
`neon/intrinsics.c`. However, we have tests that use bit-casts in `poly-add.c`
https://github.com/llvm/llvm-project/blob/6c3adaafe3f2139fba5ef3865cbcbba93dbab645/clang/test/CodeGen/AArch64/poly-add.c#L19-L41
Do you think we should include these tests or remove the bit-cast?
https://github.com/llvm/llvm-project/pull/202005
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits