-
Notifications
You must be signed in to change notification settings - Fork 83
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
Bounds check is not eliminated #356
Comments
Also |
It appears that on latest Rust, the codegen is as expected, using vcmp + test: godbolt |
There are still the bounds checks in the disassembly
When using
|
I don't think that's particularly SIMD-related, that's |
As a comparison, the trivial scalar implementation doesn't remove the bound checks either: godbolt |
I tried this code:
Godbolt
I expected to see this happen: Bounds checks are eliminated and there is the
vpcmpltd
instructionInstead, this happened: Bounds checks are not eliminated and a
vpmaxud
andvpcmpeqd
pair is usedMeta
RUSTC_BOOTSTRAP=1 rustc --version --verbose
:The text was updated successfully, but these errors were encountered: