about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTrevor Spiteri <tspiteri@ieee.org>2021-10-02 12:16:08 +0200
committerTrevor Spiteri <tspiteri@ieee.org>2021-10-02 12:16:08 +0200
commit1139ee32aa803401198c02d5541accbf3fddfc94 (patch)
treed9695e1a02a98ab580bc9a9f8794ebc2ecd33cee /compiler/rustc_codegen_llvm/src
parent6e1211081239be62a5d0bb3bbcb29a9f14621c81 (diff)
downloadrust-1139ee32aa803401198c02d5541accbf3fddfc94.tar.gz
rust-1139ee32aa803401198c02d5541accbf3fddfc94.zip
Use bitand when checking for signed integer division overflow
For `self == Self::MIN && rhs == -1`, LLVM does not realize that this is the
same check made by `self / rhs`, so the code generated may have some unnecessary
duplication. For `(self == Self::MIN) & (rhs == -1)`, LLVM realizes it is the
same check.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions