diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2021-10-27 13:00:42 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2021-10-27 17:00:36 +0200 |
| commit | 5913ef6660aa7977d7cbee01b115d8a5e926b893 (patch) | |
| tree | fb60eecbf75f513a5591638684398882e96a2169 /compiler/rustc_codegen_llvm/src | |
| parent | 47aeac648ed56095688c1c20972c9b72bd0da7ce (diff) | |
| download | rust-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 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
