about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-13 13:53:24 +0000
committerbors <bors@rust-lang.org>2023-03-13 13:53:24 +0000
commitcf8d98b227fd3c7e50aa5a9453141c5edbf5df38 (patch)
tree26d0368502a6b4f7b6cd975296d20c12b67caa63 /compiler/rustc_codegen_llvm/src
parentf1b1ed7e18f1fbe5226a96626827c625985f8285 (diff)
parente97505704e2043df46c99c3cbd0dd1ce3938c123 (diff)
downloadrust-cf8d98b227fd3c7e50aa5a9453141c5edbf5df38.tar.gz
rust-cf8d98b227fd3c7e50aa5a9453141c5edbf5df38.zip
Auto merge of #108623 - scottmcm:try-different-as-slice-impl, r=the8472
Move `Option::as_slice` to an always-sound implementation

This approach depends on CSE to not have any branches or selects when the guessed offset is correct -- which it always will be right now -- but to also be *sound* (just less efficient) if the layout algorithms change such that the guess is incorrect.

The codegen test confirms that CSE handles this as expected, leaving the optimal codegen.

cc JakobDegen #108545
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions