about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2021-10-27 13:00:42 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2021-10-27 17:00:36 +0200
commit5913ef6660aa7977d7cbee01b115d8a5e926b893 (patch)
treefb60eecbf75f513a5591638684398882e96a2169 /src/test/codegen/src-hash-algorithm
parent47aeac648ed56095688c1c20972c9b72bd0da7ce (diff)
downloadrust-5913ef6660aa7977d7cbee01b115d8a5e926b893.tar.gz
rust-5913ef6660aa7977d7cbee01b115d8a5e926b893.zip
replace `|` with `||` in {unsigned_int}::carrying_add
Using short-circuiting operators makes it easier to perform some kinds
of source code analysis, like MC/DC code coverage (a requirement in
safety-critical environments). The optimized x86_64 assembly is the same
between the old and new versions:

```
mov eax, edi
add dl, -1
adc eax, esi
setb dl
ret
```
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions