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

[NEON] Missing parentheses in mask_ls_neon.hpp #102

Closed
lawben opened this issue Jun 27, 2024 · 1 comment · Fixed by #103
Closed

[NEON] Missing parentheses in mask_ls_neon.hpp #102

lawben opened this issue Jun 27, 2024 · 1 comment · Fixed by #103
Assignees

Comments

@lawben
Copy link

lawben commented Jun 27, 2024

I'm getting the following warning with NEON:

generate_tsl_neon-asimd/include/generated/definitions/mask_ls/mask_ls_neon.hpp:850:36: 
warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
  850 |                   if ((imask >> i) & 0b1 == true) {
      |                                    ^~~~~~~~~~~~~

This looks like the generated code is "wrong". If == is evaluated first, the code checks if (mask >> i) & true, where true will just be 1. So this has the same effect in the end. You can probably just remove the == true because any value != 0 should evaluate to true anyway.

@JPietrzykTUD JPietrzykTUD linked a pull request Jul 9, 2024 that will close this issue
JPietrzykTUD added a commit that referenced this issue Jul 9, 2024
@JPietrzykTUD
Copy link
Collaborator

Fixed with #103

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 a pull request may close this issue.

3 participants