You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor simd_bitmask to reduce the number of iterations (#4129)
This PR is co-authored with @tautschnig.
Background: In #4127 we
enabled certain target features that are platform dependent (e.g. `sse`
and `sse2` for x86_64 and `neon` for aarch64) which resulted in using
the `simd_bitmask` intrinsic more frequently. Kani's current model of
that intrinsic
(https://github.com/model-checking/kani/blob/5f14b735b74f3ae3f9f1c64ce5656e1e735d42ea/library/kani/src/models/mod.rs#L72)
uses a loop that iterates `LANE` times, which requires harnesses that
touch this code (e.g. that use the `HashSet` data structure) to have a
large unwinding value, which results in a significant slowdown.
This PR refactors this function through rewriting it using a nested loop
and manually unwinding the inner loop (which operates over the bits in a
byte) so that a large unwinding value is not needed.
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
0 commit comments