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] necessary write is dropped #121229

Open
eustas opened this issue Dec 27, 2024 · 1 comment
Open

[SVE] necessary write is dropped #121229

eustas opened this issue Dec 27, 2024 · 1 comment
Labels
backend:AArch64 SVE ARM Scalable Vector Extensions

Comments

@eustas
Copy link

eustas commented Dec 27, 2024

Godbolt: https://godbolt.org/z/5cjfqh6K1

When WANT_BUG is 0 everything works as expected.
When WANT_BUG is 1 result of rng.Fill is dropped, consequently result is undefined garbage.

Compare disassembly of nevermind::N_SVE2_128::BugCore(unsigned int, unsigned long); when WANT_BUG is 0 it is 3 instructions longer; 2 of those are calculating the result (add z4.d, z2.d, z3.d) and storing it (st1d {z4.d}, p0, [x8]).

@EugeneZelenko EugeneZelenko added backend:AArch64 SVE ARM Scalable Vector Extensions and removed new issue labels Dec 27, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 27, 2024

@llvm/issue-subscribers-backend-aarch64

Author: Eugene Kliuchnikov (eustas)

Godbolt: https://godbolt.org/z/5cjfqh6K1

When WANT_BUG is 0 everything works as expected.
When WANT_BUG is 1 result of rng.Fill is dropped, consequently result is undefined garbage.

Compare disassembly of nevermind::N_SVE2_128::BugCore(unsigned int, unsigned long); when WANT_BUG is 0 it is 3 instructions longer; 2 of those are calculating the result (add z4.d, z2.d, z3.d) and storing it (st1d {z4.d}, p0, [x8]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 SVE ARM Scalable Vector Extensions
Projects
None yet
Development

No branches or pull requests

3 participants