diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-23 16:44:27 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-23 16:44:27 +0530 |
| commit | 00185bec7ce88eae94adbc3185b802bfec8cad9a (patch) | |
| tree | 2593784cc1b401fa4c5b62cd477b5496e96055ea /tests/codegen | |
| parent | 731c1a5592b6b4744fa5e64201afb3d5ab085fad (diff) | |
| parent | 400866b7ab74cb9a4e705e0c4536a8b8130eb59e (diff) | |
| download | rust-00185bec7ce88eae94adbc3185b802bfec8cad9a.tar.gz rust-00185bec7ce88eae94adbc3185b802bfec8cad9a.zip | |
Rollup merge of #111579 - scottmcm:enum-as-signed, r=oli-obk
Also assume wrap-around discriminants in `as` MIR building Resolves this FIXME: https://github.com/rust-lang/rust/blob/8d18c32b61476ed16dd15074e71be3970368d6d7/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs#L231 r? `@oli-obk`
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/option-nonzero-eq.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/codegen/option-nonzero-eq.rs b/tests/codegen/option-nonzero-eq.rs index 835decd3e5f..a394695f3bd 100644 --- a/tests/codegen/option-nonzero-eq.rs +++ b/tests/codegen/option-nonzero-eq.rs @@ -7,6 +7,9 @@ use core::cmp::Ordering; use core::num::{NonZeroU32, NonZeroI64}; use core::ptr::NonNull; +// See also tests/assembly/option-nonzero-eq.rs, for cases with `assume`s in the +// LLVM and thus don't optimize down clearly here, but do in assembly. + // CHECK-lABEL: @non_zero_eq #[no_mangle] pub fn non_zero_eq(l: Option<NonZeroU32>, r: Option<NonZeroU32>) -> bool { @@ -33,12 +36,3 @@ pub fn non_null_eq(l: Option<NonNull<u8>>, r: Option<NonNull<u8>>) -> bool { // CHECK-NEXT: ret i1 l == r } - -// CHECK-lABEL: @ordering_eq -#[no_mangle] -pub fn ordering_eq(l: Option<Ordering>, r: Option<Ordering>) -> bool { - // CHECK: start: - // CHECK-NEXT: icmp eq i8 - // CHECK-NEXT: ret i1 - l == r -} |
