Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIR][CIRGen][Builtin][Neon] Lower neon_vsetq_lane_f64 #1251

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AmrDeveloper
Copy link
Member

Lowering Neon vsetq_lane_f64

References:
Clang CGBuiltin Implementation
Builtin definition

@ghehg ghehg self-requested a review January 2, 2025 13:19
@ghehg
Copy link
Collaborator

ghehg commented Jan 2, 2025

LGTM. Thanks for working on it.

llvm_unreachable("NEON::BI__builtin_neon_vsetq_lane_f64 NYI");
case NEON::BI__builtin_neon_vsetq_lane_f64: {
Ops.push_back(emitScalarExpr(E->getArg(2)));
Ops[1] = builder.createBitcast(
Copy link
Collaborator

@ghehg ghehg Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO
To reduce code duplication which OG had, We could consider extracting
`
Ops.push_back(emitScalarExpr(E->getArg(2)));

return builder.createcir::VecInsertOp(getLoc(E->getExprLoc()), Ops[1],
Ops[0], Ops[2]);
`
into a helper function in future case like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants