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

[SVE] Use only powers of two as possible vscale values #17001

Merged
merged 1 commit into from
May 21, 2024

Conversation

lhutton1
Copy link
Contributor

When analyzing scalable expressions, the analyzer will iterate over a series of known vscale values in the range 1-16. However, we can tighten this range to only values that are a power of two, as stated in the LLVM lang ref and more generally the reference manual.

This comes from a discussion in #16921 (comment)

When analyzing scalable expressions, the analyzer will iterate over a
series of known vscale values in the range 1-16. However, we can
tighten this range to only values that are a power of two, as stated
in the [LLVM lang ref](https://llvm.org/docs/LangRef.html#llvm-vscale-intrinsic:~:text=This%20function%20attribute%20indicates%20vscale%20is%20a%20power%2Dof%2Dtwo%20within%20a%20specified%20range)
and more generally the [reference manual](https://developer.arm.com/documentation/ddi0487/latest/).

This comes from a discussion in apache#16921 (comment)

Change-Id: Iabbd1478b3853c3a6ad49c1442422bd50b8b08a6
@lhutton1 lhutton1 marked this pull request as ready for review May 21, 2024 10:59
@lhutton1
Copy link
Contributor Author

cc @ekalda @Anndrey24

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Thanks @lhutton1, well spotted :)

@ekalda ekalda merged commit a5862a5 into apache:main May 21, 2024
20 checks passed
@lhutton1
Copy link
Contributor Author

Credit here is to @Anndrey24 ;)

@lhutton1 lhutton1 deleted the vscale-powers-of-two branch May 21, 2024 15:15
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