================
@@ -685,7 +685,28 @@ static mlir::Value emitCommonNeonBuiltinExpr(
mlir::Value result = cgf.getBuilder().createXor(loc, ops[0], ops[1]);
return cgf.getBuilder().createBitcast(result, ty);
}
- case NEON::BI__builtin_neon_vaddhn_v:
+ case NEON::BI__builtin_neon_vaddhn_v: {
+ cir::VectorType srcTy =
+ cgf.getBuilder().getExtendedOrTruncatedElementVectorType(
+ vTy, /*isExtended=*/true, /*isSigned=*/false);
+
+ // %sum = add <4 x i32> %lhs, %rhs
+ ops[0] = cgf.getBuilder().createBitcast(ops[0], srcTy);
+ ops[1] = cgf.getBuilder().createBitcast(ops[1], srcTy);
----------------
banach-space wrote:
I'd be tempted to check whether these casts are actually required.
The original code-gen code has gone through many rounds of refactoring and
there's a lot of "dead" code there that's not actually needed đ
https://github.com/llvm/llvm-project/pull/204989
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits