Files
rust/src/librustc_codegen_llvm
bors 8a0e5faec7 Auto merge of #58003 - nikic:saturating-add, r=nagisa
Use LLVM intrinsics for saturating add/sub

Use the `[su](add|sub).sat` LLVM intrinsics, if we're compiling against LLVM 8, as they should optimize and codegen better than IR based on `[su](add|sub).with.overlow`.

For the fallback for LLVM < 8 I'm using the same expansion that target lowering in LLVM uses, which is not the same as Rust currently uses (in particular due to the use of selects rather than branches).

Fixes #55286.
Fixes #52203.
Fixes #44500.

r? @nagisa
2019-01-31 13:40:11 +00:00
..
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2019-01-25 19:20:38 +02:00
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2018-11-22 20:20:23 +01:00
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2019-01-25 19:20:38 +02:00
2018-12-25 21:08:33 -07:00
2019-01-30 21:07:48 +05:30
2018-12-25 21:08:33 -07:00
2018-12-25 21:08:33 -07:00
2018-11-26 15:03:13 -06:00
2019-01-12 16:18:55 +01:00
2018-12-25 21:08:33 -07:00
2019-01-12 16:18:55 +01:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.