rust/src/librustc_codegen_llvm/mir
bors b3e7d70ce7 Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum
Store scalar pair bools as i8 in memory

We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates,
to optimize IR for checked operators and the like.  With this patch, we
still do so when the pair is an immediate value, but we use the `i8`
memory type when the value is loaded or stored as an LLVM aggregate.

So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }`
in memory.  When a pair is a direct function argument, `PassMode::Pair`,
it is still passed using the immediate `i1` type, but as a return value
it will use the `i8` memory type.  Also, `bool`-like` enum tags will now
use scalar pairs when possible, where they were previously excluded due
to optimization issues.

Fixes #51516.
Closes #51566.

r? @eddyb
cc @nox
2018-07-10 03:08:47 +00:00
..
analyze.rs
block.rs Generate br for all two target SwitchInts 2018-06-02 22:21:01 +02:00
constant.rs Do not allow LLVM to increase a TLS's alignment on macOS. 2018-06-30 21:36:03 +08:00
mod.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
operand.rs Update scalar pairs per review comments 2018-07-05 14:22:09 -07:00
place.rs Update scalar pairs per review comments 2018-07-05 14:22:09 -07:00
rvalue.rs Store scalar pair bools as i8 in memory 2018-07-05 09:59:52 -07:00
statement.rs rust-lang/rust#27282: Add StatementKind::ReadForMatch to MIR. 2018-05-29 23:01:36 +02:00