about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/osstring-to-string.js
diff options
context:
space:
mode:
authorEduardo Sánchez Muñoz <eduardosm-dev@e64.io>2023-12-08 22:39:11 +0100
committerEduardo Sánchez Muñoz <eduardosm-dev@e64.io>2023-12-08 22:39:11 +0100
commitd57125632e78474e2623697fd77b5762df5b5454 (patch)
tree068bfacc8fa23c7b63860366ab60617980a0e98e /tests/rustdoc-js-std/osstring-to-string.js
parent57935c35aac3f389eb406ac5d33b7953daeba7d1 (diff)
downloadrust-d57125632e78474e2623697fd77b5762df5b5454.tar.gz
rust-d57125632e78474e2623697fd77b5762df5b5454.zip
Fix x86 SSE4.1 ptestnzc
`(op & mask) == 0` and `(op & mask) == mask` need each to be calculated for the whole vector.

For example, given
* `op = [0b100, 0b010]`
* `mask = [0b100, 0b110]`

The correct result would be:
* `op & mask = [0b100, 0b010]`
Comparisons are done on the vector as a whole:
* `all_zero = (op & mask) == [0, 0] = false`
* `masked_set = (op & mask) == mask = false`
* `!all_zero && !masked_set = true`

The previous method:
`op & mask = [0b100, 0b010]`
Comparisons are done element-wise:
* `all_zero = (op & mask) == [0, 0] = [true, true]`
* `masked_set = (op & mask) == mask = [true, false]`
* `!all_zero && !masked_set = [true, false]`
After folding with AND, the final result would be `false`, which is incorrect.
Diffstat (limited to 'tests/rustdoc-js-std/osstring-to-string.js')
0 files changed, 0 insertions, 0 deletions