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

Cached predicate register being clobbered by softfp lib call #4264

Open
pmatos opened this issue Jan 10, 2025 · 0 comments · May be fixed by #4274
Open

Cached predicate register being clobbered by softfp lib call #4264

pmatos opened this issue Jan 10, 2025 · 0 comments · May be fixed by #4274

Comments

@pmatos
Copy link
Collaborator

pmatos commented Jan 10, 2025

Unfortunately, the code to cache predicate registers for SVE x87 ldst optimization and the precision tests that do a bunch of:

load
op
store/pop

were developed at a similar time and landed more of less at a similar time. We might not have SVE hw in CI and I didn't test this until now. The culprit commit is 72a4063 . What's happening is that in this specific case we are caching p2, calling softfp fcos impl which clobbers p2 and its use in fstp causes the bug - i.e. the test to fail.

pmatos added a commit to pmatos/FEX that referenced this issue Jan 10, 2025
@pmatos pmatos changed the title Cached predicate register being clobbered softfp call Cached predicate register being clobbered by softfp lib call Jan 10, 2025
pmatos added a commit to pmatos/FEX that referenced this issue Jan 13, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
pmatos added a commit to pmatos/FEX that referenced this issue Jan 13, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
pmatos added a commit to pmatos/FEX that referenced this issue Jan 13, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
pmatos added a commit to pmatos/FEX that referenced this issue Jan 15, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
pmatos added a commit to pmatos/FEX that referenced this issue Jan 15, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
pmatos added a commit to pmatos/FEX that referenced this issue Jan 16, 2025
Whenever the control float leaves the block, it might clobber the
predicate register so we reset the cache whenever that happens.

The difficulty here is that the cache is valid only during IR generation
so we need to make sure we catch all the cases during this pass where
the execution might leave the block.

Fixes FEX-Emu#4264
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.

1 participant