rust/library/core/src
bors ee86f96ba1 Auto merge of #85828 - scottmcm:raw-eq, r=oli-obk
Stop generating `alloca`s & `memcmp` for simple short array equality

Example:
```rust
pub fn demo(x: [u16; 6], y: [u16; 6]) -> bool { x == y }
```

Before:
```llvm
define zeroext i1 `@_ZN10playground4demo17h48537f7eac23948fE(i96` %0, i96 %1) unnamed_addr #0 {
start:
  %y = alloca [6 x i16], align 8
  %x = alloca [6 x i16], align 8
  %.0..sroa_cast = bitcast [6 x i16]* %x to i96*
  store i96 %0, i96* %.0..sroa_cast, align 8
  %.0..sroa_cast3 = bitcast [6 x i16]* %y to i96*
  store i96 %1, i96* %.0..sroa_cast3, align 8
  %_11.i.i.i = bitcast [6 x i16]* %x to i8*
  %_14.i.i.i = bitcast [6 x i16]* %y to i8*
  %bcmp.i.i.i = call i32 `@bcmp(i8*` nonnull dereferenceable(12) %_11.i.i.i, i8* nonnull dereferenceable(12) %_14.i.i.i, i64 12) #2, !alias.scope !2
  %2 = icmp eq i32 %bcmp.i.i.i, 0
  ret i1 %2
}
```
```x86
playground::demo: # `@playground::demo`
	sub	rsp, 32
	mov	qword ptr [rsp], rdi
	mov	dword ptr [rsp + 8], esi
	mov	qword ptr [rsp + 16], rdx
	mov	dword ptr [rsp + 24], ecx
	xor	rdi, rdx
	xor	esi, ecx
	or	rsi, rdi
	sete	al
	add	rsp, 32
	ret
```

After:
```llvm
define zeroext i1 `@_ZN4mini4demo17h7a8994aaa314c981E(i96` %0, i96 %1) unnamed_addr #0 {
start:
  %2 = icmp eq i96 %0, %1
  ret i1 %2
}
```
```x86
_ZN4mini4demo17h7a8994aaa314c981E:
	xor	rcx, r8
	xor	edx, r9d
	or	rdx, rcx
	sete	al
	ret
```
2021-07-09 09:16:27 +00:00
..
alloc Use #[non_exhaustive] where appropriate 2021-06-24 04:16:11 -04:00
array Stop generating allocas+memcmp for simple array equality 2021-07-08 14:55:54 -07:00
char Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
convert Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
fmt Auto merge of #86048 - nbdd0121:no_floating_point, r=Amanieu 2021-07-04 14:18:57 +00:00
future remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
hash Add tracking issue and rename to hash_one 2021-06-24 01:30:48 -07:00
iter Auto merge of #86904 - m-ou-se:prelude-collision-check-trait, r=nikomatsakis 2021-07-09 06:35:42 +00:00
macros fix matches! and assert_matches! on edition 2021 2021-05-25 16:44:20 +02:00
mem Revert "Revert effects of PRs 81167 and 83091." 2021-06-27 12:05:16 +02:00
num special case for integer log10 2021-07-07 14:10:05 +02:00
ops Fix typo in ops::Drop docs 2021-07-07 22:26:32 +03:00
prelude Stabilize {std, core}::prelude::rust_*. 2021-06-14 14:44:50 +00:00
ptr Add reference to tracking issue #86302 for const_ptr_write 2021-06-27 12:05:19 +02:00
slice Auto merge of #86823 - the8472:opt-chunk-tra, r=kennytm 2021-07-08 09:44:52 +00:00
str Rollup merge of #86852 - Amanieu:remove_doc_aliases, r=joshtriplett 2021-07-06 02:33:16 +09:00
stream Remove Stream::next 2021-01-23 16:54:56 +01:00
sync Fix typo in core::sync::atomic::compiler_fence example 2021-07-06 10:53:14 -03:00
task Auto merge of #86598 - yoshuawuyts:poll-method-docs, r=JohnTitor 2021-07-04 20:00:57 +00:00
unicode Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
any.rs Change the Debug impl of Any and UnsafeCell to use finish_non_exhaustive 2021-04-21 14:51:04 +02:00
ascii.rs Replace all fmt.pad with debug_struct 2021-04-21 14:38:24 +02:00
bool.rs Stabilise then 2020-11-22 13:45:14 +00:00
borrow.rs Fix borrow and deref 2021-03-03 11:23:29 +01:00
cell.rs Use #[non_exhaustive] where appropriate 2021-06-24 04:16:11 -04:00
clone.rs Updates Clone docs for Copy comparison. 2021-06-10 11:28:26 -04:00
cmp.rs Fix a few misspellings. 2021-06-25 13:18:56 -07:00
default.rs Add diagnostic item to Default trait 2021-03-04 10:14:48 -08:00
ffi.rs Replace all fmt.pad with debug_struct 2021-04-21 14:38:24 +02:00
hint.rs Auto merge of #84725 - sebpop:arm64-isb, r=joshtriplett 2021-05-02 04:54:31 +00:00
internal_macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs PR feedback 2021-07-08 14:55:57 -07:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs Add s to non_fmt_panic 2021-07-06 20:12:56 +02:00
marker.rs Rename variable 2021-06-29 20:26:37 -04:00
option.rs Update to new bootstrap compiler 2021-06-28 11:30:49 -04:00
panic.rs Implement new panic!() behaviour for Rust 2021. 2021-01-25 13:48:11 +01:00
panicking.rs Fix panic message of assert_failed_inner 2021-03-13 18:50:43 +08:00
pin.rs Fix overlength lines in core::pin. 2021-01-05 20:14:02 +01:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
result.rs Update to new bootstrap compiler 2021-06-28 11:30:49 -04:00
time.rs Rollup merge of #82179 - mbartlett21:patch-5, r=joshtriplett 2021-06-15 17:40:03 +09:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00