about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2021-10-27 16:56:57 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2021-10-27 17:00:46 +0200
commit9fb66969e38f1ce4b269f9506faf7ebc161ececa (patch)
treed2d909cf1eb177776d924ba420bd4d8539603f2a /compiler/rustc_codegen_llvm/src
parent5913ef6660aa7977d7cbee01b115d8a5e926b893 (diff)
downloadrust-9fb66969e38f1ce4b269f9506faf7ebc161ececa.tar.gz
rust-9fb66969e38f1ce4b269f9506faf7ebc161ececa.zip
replace `|` with `||` in {unsigned_int}::borrowing_sub
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
sbb eax, esi
setb dl
ret
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions