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_vtst_v and neon_vtstq_v #1013

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

ghehg
Copy link
Collaborator

@ghehg ghehg commented Oct 28, 2024

In addition, this PR enables ZeroAttr of vector type so that CIR can generate a vector initialized with all zero values.

@ghehg ghehg marked this pull request as ready for review October 29, 2024 00:04
Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM pending minor comment update

ops[0] = builder.createBitcast(ops[0], ty);
ops[1] = builder.createBitcast(ops[1], ty);
ops[0] = builder.createAnd(ops[0], ops[1]);
// CIR VecCmpO LLVM Lowering always creates SExt for vector of int type
Copy link
Member

Choose a reason for hiding this comment

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

VecCmpO -> VecCmpOp

Copy link
Member

Choose a reason for hiding this comment

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

LLVM isn't the only path to lower CIR from nor we should assume the reader knows anything about OG codegen. It's fine if you add a note about it but make sure you are not making assumptions of what this is going to be lowered to. Example:

// Note that during LLVM lowering `VecCmpOp` result is sign extended, matching what traditional codegen behavior.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense. Especially without looking at OG code, reader wouldn't know why this comment is here. Will change it.

@bcardosolopes bcardosolopes merged commit 7e7be0e into llvm:main Oct 31, 2024
6 checks passed
lanza pushed a commit that referenced this pull request Nov 5, 2024
In addition, this PR enables ZeroAttr of vector type so that CIR can
generate a vector initialized with all zero values.
lanza pushed a commit that referenced this pull request Mar 18, 2025
In addition, this PR enables ZeroAttr of vector type so that CIR can
generate a vector initialized with all zero values.
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.

None yet

2 participants