mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Migrate mir-opt tests from PreCodegen to runtime-optimized
MIR dumped before/after the dummy `PreCodegen` pass should be identical to MIR dumped after the phase transition to `runtime-optimized`.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `foo` after PreCodegen
|
||||
// MIR for `foo` after runtime-optimized
|
||||
|
||||
fn foo(_1: Option<String>) -> i32 {
|
||||
debug s => _1;
|
||||
@@ -4,7 +4,7 @@
|
||||
#![feature(deref_patterns)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR string.foo.PreCodegen.after.mir
|
||||
// EMIT_MIR string.foo.runtime-optimized.after.mir
|
||||
pub fn foo(s: Option<String>) -> i32 {
|
||||
match s {
|
||||
Some("a") => 1234,
|
||||
|
||||
@@ -7,7 +7,7 @@ fn get_bool(c: bool) -> bool {
|
||||
c
|
||||
}
|
||||
|
||||
// EMIT_MIR while_storage.while_loop.PreCodegen.after.mir
|
||||
// EMIT_MIR while_storage.while_loop.runtime-optimized.after.mir
|
||||
fn while_loop(c: bool) {
|
||||
// CHECK-LABEL: fn while_loop(
|
||||
// CHECK: bb0: {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `while_loop` after PreCodegen
|
||||
// MIR for `while_loop` after runtime-optimized
|
||||
|
||||
fn while_loop(_1: bool) -> () {
|
||||
debug c => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `while_loop` after PreCodegen
|
||||
// MIR for `while_loop` after runtime-optimized
|
||||
|
||||
fn while_loop(_1: bool) -> () {
|
||||
debug c => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `hello` before PreCodegen
|
||||
// MIR for `hello` after runtime-optimized
|
||||
|
||||
fn hello() -> () {
|
||||
let mut _0: ();
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `hello` before PreCodegen
|
||||
// MIR for `hello` after runtime-optimized
|
||||
|
||||
fn hello() -> () {
|
||||
let mut _0: ();
|
||||
@@ -9,7 +9,7 @@ trait NeedsDrop: Sized {
|
||||
impl<This> NeedsDrop for This {}
|
||||
|
||||
// EMIT_MIR control_flow_simplification.hello.GVN.diff
|
||||
// EMIT_MIR control_flow_simplification.hello.PreCodegen.before.mir
|
||||
// EMIT_MIR control_flow_simplification.hello.runtime-optimized.after.mir
|
||||
fn hello<T>() {
|
||||
// CHECK-LABEL: fn hello(
|
||||
// CHECK: bb0:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `add` before PreCodegen
|
||||
// MIR for `add` after runtime-optimized
|
||||
|
||||
fn add() -> u32 {
|
||||
let mut _0: u32;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `add` before PreCodegen
|
||||
// MIR for `add` after runtime-optimized
|
||||
|
||||
fn add() -> u32 {
|
||||
let mut _0: u32;
|
||||
@@ -3,7 +3,7 @@
|
||||
//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
|
||||
|
||||
// EMIT_MIR return_place.add.GVN.diff
|
||||
// EMIT_MIR return_place.add.PreCodegen.before.mir
|
||||
// EMIT_MIR return_place.add.runtime-optimized.after.mir
|
||||
fn add() -> u32 {
|
||||
// CHECK-LABEL: fn add(
|
||||
// CHECK: _0 = const 4_u32;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `caller` after PreCodegen
|
||||
// MIR for `caller` after runtime-optimized
|
||||
|
||||
fn caller() -> () {
|
||||
let mut _0: ();
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `caller` after PreCodegen
|
||||
// MIR for `caller` after runtime-optimized
|
||||
|
||||
fn caller() -> () {
|
||||
let mut _0: ();
|
||||
@@ -9,7 +9,7 @@
|
||||
pub fn callee() {}
|
||||
|
||||
// EMIT_MIR rustc_no_mir_inline.caller.Inline.diff
|
||||
// EMIT_MIR rustc_no_mir_inline.caller.PreCodegen.after.mir
|
||||
// EMIT_MIR rustc_no_mir_inline.caller.runtime-optimized.after.mir
|
||||
pub fn caller() {
|
||||
// CHECK-LABEL: fn caller(
|
||||
// CHECK: callee()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// After MCP#693, though, that's the backend's problem, not something in MIR.
|
||||
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.runtime-optimized.after.mir
|
||||
pub unsafe fn unchecked_shl_unsigned_smaller(a: u16, b: u32) -> u16 {
|
||||
// CHECK-LABEL: fn unchecked_shl_unsigned_smaller(
|
||||
// CHECK: (inlined #[track_caller] core::num::<impl u16>::unchecked_shl)
|
||||
@@ -15,7 +15,7 @@ pub unsafe fn unchecked_shl_unsigned_smaller(a: u16, b: u32) -> u16 {
|
||||
}
|
||||
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shr_signed_bigger.Inline.diff
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shr_signed_bigger.PreCodegen.after.mir
|
||||
// EMIT_MIR unchecked_shifts.unchecked_shr_signed_bigger.runtime-optimized.after.mir
|
||||
pub unsafe fn unchecked_shr_signed_bigger(a: i64, b: u32) -> i64 {
|
||||
// CHECK-LABEL: fn unchecked_shr_signed_bigger(
|
||||
// CHECK: (inlined #[track_caller] core::num::<impl i64>::unchecked_shr)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unchecked_shl_unsigned_smaller` after PreCodegen
|
||||
// MIR for `unchecked_shl_unsigned_smaller` after runtime-optimized
|
||||
|
||||
fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unchecked_shl_unsigned_smaller` after PreCodegen
|
||||
// MIR for `unchecked_shl_unsigned_smaller` after runtime-optimized
|
||||
|
||||
fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unchecked_shr_signed_bigger` after PreCodegen
|
||||
// MIR for `unchecked_shr_signed_bigger` after runtime-optimized
|
||||
|
||||
fn unchecked_shr_signed_bigger(_1: i64, _2: u32) -> i64 {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unchecked_shr_signed_bigger` after PreCodegen
|
||||
// MIR for `unchecked_shr_signed_bigger` after runtime-optimized
|
||||
|
||||
fn unchecked_shr_signed_bigger(_1: i64, _2: u32) -> i64 {
|
||||
debug a => _1;
|
||||
@@ -4,7 +4,7 @@
|
||||
//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir
|
||||
|
||||
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff
|
||||
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
|
||||
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.runtime-optimized.after.mir
|
||||
pub unsafe fn unwrap_unchecked<T>(slf: Option<T>) -> T {
|
||||
// CHECK-LABEL: fn unwrap_unchecked(
|
||||
// CHECK: (inlined #[track_caller] Option::<T>::unwrap_unchecked)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unwrap_unchecked` after PreCodegen
|
||||
// MIR for `unwrap_unchecked` after runtime-optimized
|
||||
|
||||
fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||
debug slf => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `unwrap_unchecked` after PreCodegen
|
||||
// MIR for `unwrap_unchecked` after runtime-optimized
|
||||
|
||||
fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||
debug slf => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `num_to_digit` after PreCodegen
|
||||
// MIR for `num_to_digit` after runtime-optimized
|
||||
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `num_to_digit` after PreCodegen
|
||||
// MIR for `num_to_digit` after runtime-optimized
|
||||
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `num_to_digit` after PreCodegen
|
||||
// MIR for `num_to_digit` after runtime-optimized
|
||||
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `num_to_digit` after PreCodegen
|
||||
// MIR for `num_to_digit` after runtime-optimized
|
||||
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
@@ -9,7 +9,7 @@
|
||||
// Once the optimizer can do that, this test case will need to be updated and codegen/issue-59352.rs
|
||||
// removed.
|
||||
|
||||
// EMIT_MIR issue_59352.num_to_digit.PreCodegen.after.mir
|
||||
// EMIT_MIR issue_59352.num_to_digit.runtime-optimized.after.mir
|
||||
//@ compile-flags: -Z mir-opt-level=3 -Z span_free_formats
|
||||
|
||||
pub fn num_to_digit(num: char) -> u32 {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `main` after PreCodegen
|
||||
// MIR for `main` after runtime-optimized
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use std::pat::pattern_type;
|
||||
|
||||
// EMIT_MIR pattern_types.main.PreCodegen.after.mir
|
||||
// EMIT_MIR pattern_types.main.runtime-optimized.after.mir
|
||||
fn main() {
|
||||
// CHECK: debug x => const 2_u32 is 1..
|
||||
let x: pattern_type!(u32 is 1..) = unsafe { std::mem::transmute(2) };
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_ipv4` after PreCodegen
|
||||
// MIR for `eq_ipv4` after runtime-optimized
|
||||
|
||||
fn eq_ipv4(_1: &[u8; 4], _2: &[u8; 4]) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_ipv4` after PreCodegen
|
||||
// MIR for `eq_ipv4` after runtime-optimized
|
||||
|
||||
fn eq_ipv4(_1: &[u8; 4], _2: &[u8; 4]) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_ipv6` after PreCodegen
|
||||
// MIR for `eq_ipv6` after runtime-optimized
|
||||
|
||||
fn eq_ipv6(_1: &[u16; 8], _2: &[u16; 8]) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_ipv6` after PreCodegen
|
||||
// MIR for `eq_ipv6` after runtime-optimized
|
||||
|
||||
fn eq_ipv6(_1: &[u16; 8], _2: &[u16; 8]) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_odd_length` after PreCodegen
|
||||
// MIR for `eq_odd_length` after runtime-optimized
|
||||
|
||||
fn eq_odd_length(_1: &[u8; 3], _2: &[u8; 3]) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `eq_odd_length` after PreCodegen
|
||||
// MIR for `eq_odd_length` after runtime-optimized
|
||||
|
||||
fn eq_odd_length(_1: &[u8; 3], _2: &[u8; 3]) -> bool {
|
||||
debug a => _1;
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR array_eq.eq_odd_length.PreCodegen.after.mir
|
||||
// EMIT_MIR array_eq.eq_odd_length.runtime-optimized.after.mir
|
||||
pub unsafe fn eq_odd_length<T: Copy>(a: &[u8; 3], b: &[u8; 3]) -> bool {
|
||||
// CHECK-LABEL: fn eq_odd_length(_1: &[u8; 3], _2: &[u8; 3]) -> bool
|
||||
// CHECK: _0 = raw_eq::<[u8; 3]>(move _1, move _2)
|
||||
a == b
|
||||
}
|
||||
|
||||
// EMIT_MIR array_eq.eq_ipv4.PreCodegen.after.mir
|
||||
// EMIT_MIR array_eq.eq_ipv4.runtime-optimized.after.mir
|
||||
pub unsafe fn eq_ipv4<T: Copy>(a: &[u8; 4], b: &[u8; 4]) -> bool {
|
||||
// CHECK-LABEL: fn eq_ipv4(_1: &[u8; 4], _2: &[u8; 4]) -> bool
|
||||
// CHECK: [[A:_.+]] = copy (*_1) as u32 (Transmute);
|
||||
@@ -19,7 +19,7 @@
|
||||
a == b
|
||||
}
|
||||
|
||||
// EMIT_MIR array_eq.eq_ipv6.PreCodegen.after.mir
|
||||
// EMIT_MIR array_eq.eq_ipv6.runtime-optimized.after.mir
|
||||
pub unsafe fn eq_ipv6<T: Copy>(a: &[u16; 8], b: &[u16; 8]) -> bool {
|
||||
// CHECK-LABEL: fn eq_ipv6(_1: &[u16; 8], _2: &[u16; 8]) -> bool
|
||||
// CHECK: [[A:_.+]] = copy (*_1) as u128 (Transmute);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `bitand` after PreCodegen
|
||||
// MIR for `bitand` after runtime-optimized
|
||||
|
||||
fn bitand(_1: &Blueprint, _2: &Blueprint) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `naive` after PreCodegen
|
||||
// MIR for `naive` after runtime-optimized
|
||||
|
||||
fn naive(_1: &Blueprint, _2: &Blueprint) -> bool {
|
||||
debug a => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `returning` after PreCodegen
|
||||
// MIR for `returning` after runtime-optimized
|
||||
|
||||
fn returning(_1: &Blueprint, _2: &Blueprint) -> bool {
|
||||
debug a => _1;
|
||||
@@ -46,6 +46,6 @@ pub fn returning(a: &Blueprint, b: &Blueprint) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
// EMIT_MIR chained_comparison.naive.PreCodegen.after.mir
|
||||
// EMIT_MIR chained_comparison.bitand.PreCodegen.after.mir
|
||||
// EMIT_MIR chained_comparison.returning.PreCodegen.after.mir
|
||||
// EMIT_MIR chained_comparison.naive.runtime-optimized.after.mir
|
||||
// EMIT_MIR chained_comparison.bitand.runtime-optimized.after.mir
|
||||
// EMIT_MIR chained_comparison.returning.runtime-optimized.after.mir
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `checked_shl` after PreCodegen
|
||||
// MIR for `checked_shl` after runtime-optimized
|
||||
|
||||
fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `checked_shl` after PreCodegen
|
||||
// MIR for `checked_shl` after runtime-optimized
|
||||
|
||||
fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
|
||||
debug x => _1;
|
||||
@@ -4,7 +4,7 @@
|
||||
#![crate_type = "lib"]
|
||||
#![feature(step_trait)]
|
||||
|
||||
// EMIT_MIR checked_ops.step_forward.PreCodegen.after.mir
|
||||
// EMIT_MIR checked_ops.step_forward.runtime-optimized.after.mir
|
||||
pub fn step_forward(x: u16, n: usize) -> u16 {
|
||||
// This uses `u16` so that the conversion to usize is always widening.
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn step_forward(x: u16, n: usize) -> u16 {
|
||||
std::iter::Step::forward(x, n)
|
||||
}
|
||||
|
||||
// EMIT_MIR checked_ops.checked_shl.PreCodegen.after.mir
|
||||
// EMIT_MIR checked_ops.checked_shl.runtime-optimized.after.mir
|
||||
pub fn checked_shl(x: u32, rhs: u32) -> Option<u32> {
|
||||
// CHECK-LABEL: fn checked_shl
|
||||
// CHECK: [[TEMP:_[0-9]+]] = ShlUnchecked(copy _1, copy _2)
|
||||
@@ -21,7 +21,7 @@ pub fn checked_shl(x: u32, rhs: u32) -> Option<u32> {
|
||||
x.checked_shl(rhs)
|
||||
}
|
||||
|
||||
// EMIT_MIR checked_ops.use_checked_sub.PreCodegen.after.mir
|
||||
// EMIT_MIR checked_ops.use_checked_sub.runtime-optimized.after.mir
|
||||
pub fn use_checked_sub(x: u32, rhs: u32) {
|
||||
// We want this to be equivalent to open-coding it, leaving no `Option`s around.
|
||||
// FIXME(#138544): It's not yet.
|
||||
@@ -37,7 +37,7 @@ pub fn use_checked_sub(x: u32, rhs: u32) {
|
||||
}
|
||||
}
|
||||
|
||||
// EMIT_MIR checked_ops.saturating_sub_at_home.PreCodegen.after.mir
|
||||
// EMIT_MIR checked_ops.saturating_sub_at_home.runtime-optimized.after.mir
|
||||
pub fn saturating_sub_at_home(lhs: u32, rhs: u32) -> u32 {
|
||||
// FIXME(#138544): Similarly here, the `Option` ought to optimize away
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `saturating_sub_at_home` after PreCodegen
|
||||
// MIR for `saturating_sub_at_home` after runtime-optimized
|
||||
|
||||
fn saturating_sub_at_home(_1: u32, _2: u32) -> u32 {
|
||||
debug lhs => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `saturating_sub_at_home` after PreCodegen
|
||||
// MIR for `saturating_sub_at_home` after runtime-optimized
|
||||
|
||||
fn saturating_sub_at_home(_1: u32, _2: u32) -> u32 {
|
||||
debug lhs => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `step_forward` after PreCodegen
|
||||
// MIR for `step_forward` after runtime-optimized
|
||||
|
||||
fn step_forward(_1: u16, _2: usize) -> u16 {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `step_forward` after PreCodegen
|
||||
// MIR for `step_forward` after runtime-optimized
|
||||
|
||||
fn step_forward(_1: u16, _2: usize) -> u16 {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `use_checked_sub` after PreCodegen
|
||||
// MIR for `use_checked_sub` after runtime-optimized
|
||||
|
||||
fn use_checked_sub(_1: u32, _2: u32) -> () {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `use_checked_sub` after PreCodegen
|
||||
// MIR for `use_checked_sub` after runtime-optimized
|
||||
|
||||
fn use_checked_sub(_1: u32, _2: u32) -> () {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `clone_as_copy` after PreCodegen
|
||||
// MIR for `clone_as_copy` after runtime-optimized
|
||||
|
||||
fn clone_as_copy(_1: &NestCopy) -> NestCopy {
|
||||
debug v => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `enum_clone_as_copy` after PreCodegen
|
||||
// MIR for `enum_clone_as_copy` after runtime-optimized
|
||||
|
||||
fn enum_clone_as_copy(_1: &Enum1) -> Enum1 {
|
||||
debug v => _1;
|
||||
@@ -22,7 +22,7 @@ enum Enum1 {
|
||||
B(NestCopy),
|
||||
}
|
||||
|
||||
// EMIT_MIR clone_as_copy.clone_as_copy.PreCodegen.after.mir
|
||||
// EMIT_MIR clone_as_copy.clone_as_copy.runtime-optimized.after.mir
|
||||
fn clone_as_copy(v: &NestCopy) -> NestCopy {
|
||||
// CHECK-LABEL: fn clone_as_copy(
|
||||
// CHECK: let [[DEAD_VAR:_.*]]: &AllCopy;
|
||||
@@ -33,7 +33,7 @@ fn clone_as_copy(v: &NestCopy) -> NestCopy {
|
||||
v.clone()
|
||||
}
|
||||
|
||||
// EMIT_MIR clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir
|
||||
// EMIT_MIR clone_as_copy.enum_clone_as_copy.runtime-optimized.after.mir
|
||||
fn enum_clone_as_copy(v: &Enum1) -> Enum1 {
|
||||
// CHECK-LABEL: fn enum_clone_as_copy(
|
||||
// CHECK: bb0: {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `direct` after PreCodegen
|
||||
// MIR for `direct` after runtime-optimized
|
||||
|
||||
fn direct(_1: Option<std::cmp::Ordering>) -> bool {
|
||||
debug e => _1;
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
||||
// EMIT_MIR const_promotion_option_ordering_eq.direct.PreCodegen.after.mir
|
||||
// EMIT_MIR const_promotion_option_ordering_eq.direct.runtime-optimized.after.mir
|
||||
pub fn direct(e: Option<Ordering>) -> bool {
|
||||
// CHECK-LABEL: fn direct(
|
||||
// CHECK-NOT: promoted[
|
||||
@@ -19,7 +19,7 @@ pub fn direct(e: Option<Ordering>) -> bool {
|
||||
e == Some(Ordering::Equal)
|
||||
}
|
||||
|
||||
// EMIT_MIR const_promotion_option_ordering_eq.with_let.PreCodegen.after.mir
|
||||
// EMIT_MIR const_promotion_option_ordering_eq.with_let.runtime-optimized.after.mir
|
||||
pub fn with_let(e: Option<Ordering>) -> bool {
|
||||
// CHECK-LABEL: fn with_let(
|
||||
// CHECK-NOT: promoted[
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `with_let` after PreCodegen
|
||||
// MIR for `with_let` after runtime-optimized
|
||||
|
||||
fn with_let(_1: Option<std::cmp::Ordering>) -> bool {
|
||||
debug e => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `invalid_place` after PreCodegen
|
||||
// MIR for `invalid_place` after runtime-optimized
|
||||
|
||||
fn invalid_place(_1: bool) -> bool {
|
||||
debug c1_ref => _2;
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use std::intrinsics::mir::*;
|
||||
|
||||
// EMIT_MIR dead_on_invalid_place.invalid_place.PreCodegen.after.mir
|
||||
// EMIT_MIR dead_on_invalid_place.invalid_place.runtime-optimized.after.mir
|
||||
#[custom_mir(dialect = "runtime")]
|
||||
pub fn invalid_place(c: bool) -> bool {
|
||||
// CHECK-LABEL: fn invalid_place
|
||||
|
||||
@@ -29,4 +29,4 @@ fn main() {
|
||||
}
|
||||
|
||||
// EMIT_MIR deref_nested_borrows.src.GVN.diff
|
||||
// EMIT_MIR deref_nested_borrows.src.PreCodegen.after.mir
|
||||
// EMIT_MIR deref_nested_borrows.src.runtime-optimized.after.mir
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `src` after PreCodegen
|
||||
// MIR for `src` after runtime-optimized
|
||||
|
||||
fn src(_1: &&u8) -> bool {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `src` after PreCodegen
|
||||
// MIR for `src` after runtime-optimized
|
||||
|
||||
fn src(_1: &&u8) -> bool {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `demo_le` after PreCodegen
|
||||
// MIR for `demo_le` after runtime-optimized
|
||||
|
||||
fn demo_le(_1: &MultiField, _2: &MultiField) -> bool {
|
||||
debug a => _1;
|
||||
@@ -33,5 +33,5 @@ pub fn demo_le(a: &MultiField, b: &MultiField) -> bool {
|
||||
*a <= *b
|
||||
}
|
||||
|
||||
// EMIT_MIR derived_ord.{impl#0}-partial_cmp.PreCodegen.after.mir
|
||||
// EMIT_MIR derived_ord.demo_le.PreCodegen.after.mir
|
||||
// EMIT_MIR derived_ord.{impl#0}-partial_cmp.runtime-optimized.after.mir
|
||||
// EMIT_MIR derived_ord.demo_le.runtime-optimized.after.mir
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/derived_ord.rs:5:10: 5:20>::partial_cmp` after PreCodegen
|
||||
// MIR for `<impl at $DIR/derived_ord.rs:5:10: 5:20>::partial_cmp` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/derived_ord.rs:5:10: 5:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
|
||||
debug self => _1;
|
||||
@@ -6,8 +6,8 @@
|
||||
#[derive(PartialOrd, Ord, PartialEq, Eq)]
|
||||
pub struct MultiField(char, i16);
|
||||
|
||||
// EMIT_MIR derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.mir
|
||||
// EMIT_MIR derived_ord_debug.{impl#1}-cmp.PreCodegen.after.mir
|
||||
// EMIT_MIR derived_ord_debug.{impl#0}-partial_cmp.runtime-optimized.after.mir
|
||||
// EMIT_MIR derived_ord_debug.{impl#1}-cmp.runtime-optimized.after.mir
|
||||
|
||||
// CHECK-LABEL: partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering>
|
||||
// CHECK: = <char as PartialOrd>::partial_cmp(
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after PreCodegen
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
|
||||
debug self => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after PreCodegen
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
|
||||
debug self => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after PreCodegen
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp(_1: &MultiField, _2: &MultiField) -> std::cmp::Ordering {
|
||||
debug self => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after PreCodegen
|
||||
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp(_1: &MultiField, _2: &MultiField) -> std::cmp::Ordering {
|
||||
debug self => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `drop_bytes` after PreCodegen
|
||||
// MIR for `drop_bytes` after runtime-optimized
|
||||
|
||||
fn drop_bytes(_1: *mut Box<[u8; 1024]>) -> () {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `drop_bytes` after PreCodegen
|
||||
// MIR for `drop_bytes` after runtime-optimized
|
||||
|
||||
fn drop_bytes(_1: *mut Box<[u8; 1024]>) -> () {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `drop_generic` after PreCodegen
|
||||
// MIR for `drop_generic` after runtime-optimized
|
||||
|
||||
fn drop_generic(_1: *mut Box<T>) -> () {
|
||||
debug x => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `drop_generic` after PreCodegen
|
||||
// MIR for `drop_generic` after runtime-optimized
|
||||
|
||||
fn drop_generic(_1: *mut Box<T>) -> () {
|
||||
debug x => _1;
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR drop_box_of_sized.drop_generic.PreCodegen.after.mir
|
||||
// EMIT_MIR drop_box_of_sized.drop_generic.runtime-optimized.after.mir
|
||||
pub unsafe fn drop_generic<T: Copy>(x: *mut Box<T>) {
|
||||
// CHECK-LABEL: fn drop_generic
|
||||
// CHECK: [[ALIGNMENT:_.+]] = const <T as std::mem::SizedTypeProperties>::ALIGN as std::mem::Alignment (Transmute)
|
||||
@@ -11,7 +11,7 @@ pub unsafe fn drop_generic<T: Copy>(x: *mut Box<T>) {
|
||||
std::ptr::drop_in_place(x)
|
||||
}
|
||||
|
||||
// EMIT_MIR drop_box_of_sized.drop_bytes.PreCodegen.after.mir
|
||||
// EMIT_MIR drop_box_of_sized.drop_bytes.runtime-optimized.after.mir
|
||||
pub unsafe fn drop_bytes(x: *mut Box<[u8; 1024]>) {
|
||||
// CHECK-LABEL: fn drop_bytes
|
||||
// CHECK: alloc::alloc::__rust_dealloc({{.+}}, const 1024_usize, {{.+}}Align1Shl0 {{.+}})
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `generic_in_place` after PreCodegen
|
||||
// MIR for `generic_in_place` after runtime-optimized
|
||||
|
||||
fn generic_in_place(_1: *mut Box<[T]>) -> () {
|
||||
debug ptr => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `generic_in_place` after PreCodegen
|
||||
// MIR for `generic_in_place` after runtime-optimized
|
||||
|
||||
fn generic_in_place(_1: *mut Box<[T]>) -> () {
|
||||
debug ptr => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `generic_in_place` after PreCodegen
|
||||
// MIR for `generic_in_place` after runtime-optimized
|
||||
|
||||
fn generic_in_place(_1: *mut Box<[T]>) -> () {
|
||||
debug ptr => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `generic_in_place` after PreCodegen
|
||||
// MIR for `generic_in_place` after runtime-optimized
|
||||
|
||||
fn generic_in_place(_1: *mut Box<[T]>) -> () {
|
||||
debug ptr => _1;
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR drop_boxed_slice.generic_in_place.PreCodegen.after.mir
|
||||
// EMIT_MIR drop_boxed_slice.generic_in_place.runtime-optimized.after.mir
|
||||
pub unsafe fn generic_in_place<T: Copy>(ptr: *mut Box<[T]>) {
|
||||
// CHECK-LABEL: fn generic_in_place(_1: *mut Box<[T]>)
|
||||
// CHECK: (inlined <Box<[T]> as Drop>::drop)
|
||||
|
||||
@@ -8,7 +8,7 @@ pub enum Thing {
|
||||
B,
|
||||
}
|
||||
|
||||
// EMIT_MIR duplicate_switch_targets.ub_if_b.PreCodegen.after.mir
|
||||
// EMIT_MIR duplicate_switch_targets.ub_if_b.runtime-optimized.after.mir
|
||||
pub unsafe fn ub_if_b(t: Thing) -> Thing {
|
||||
match t {
|
||||
Thing::A => t,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `ub_if_b` after PreCodegen
|
||||
// MIR for `ub_if_b` after runtime-optimized
|
||||
|
||||
fn ub_if_b(_1: Thing) -> Thing {
|
||||
debug t => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `f_u64` after PreCodegen
|
||||
// MIR for `f_u64` after runtime-optimized
|
||||
|
||||
fn f_u64() -> () {
|
||||
let mut _0: ();
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `f_unit` after PreCodegen
|
||||
// MIR for `f_unit` after runtime-optimized
|
||||
|
||||
fn f_unit() -> () {
|
||||
let mut _0: ();
|
||||
@@ -7,12 +7,12 @@
|
||||
#![feature(core_intrinsics)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR intrinsics.f_unit.PreCodegen.after.mir
|
||||
// EMIT_MIR intrinsics.f_unit.runtime-optimized.after.mir
|
||||
pub fn f_unit() {
|
||||
f_dispatch(());
|
||||
}
|
||||
|
||||
// EMIT_MIR intrinsics.f_u64.PreCodegen.after.mir
|
||||
// EMIT_MIR intrinsics.f_u64.runtime-optimized.after.mir
|
||||
pub fn f_u64() {
|
||||
f_dispatch(0u64);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `filter_mapped` after PreCodegen
|
||||
// MIR for `filter_mapped` after runtime-optimized
|
||||
|
||||
fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> () {
|
||||
debug iter => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `int_range` after PreCodegen
|
||||
// MIR for `int_range` after runtime-optimized
|
||||
|
||||
fn int_range(_1: usize, _2: usize) -> () {
|
||||
debug start => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `mapped` after PreCodegen
|
||||
// MIR for `mapped` after runtime-optimized
|
||||
|
||||
fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () {
|
||||
debug iter => _1;
|
||||
@@ -32,7 +32,7 @@ pub fn vec_move(mut v: Vec<impl Sized>) {
|
||||
#[inline(never)]
|
||||
fn opaque(_: impl Sized) {}
|
||||
|
||||
// EMIT_MIR loops.int_range.PreCodegen.after.mir
|
||||
// EMIT_MIR loops.mapped.PreCodegen.after.mir
|
||||
// EMIT_MIR loops.filter_mapped.PreCodegen.after.mir
|
||||
// EMIT_MIR loops.vec_move.PreCodegen.after.mir
|
||||
// EMIT_MIR loops.int_range.runtime-optimized.after.mir
|
||||
// EMIT_MIR loops.mapped.runtime-optimized.after.mir
|
||||
// EMIT_MIR loops.filter_mapped.runtime-optimized.after.mir
|
||||
// EMIT_MIR loops.vec_move.runtime-optimized.after.mir
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `vec_move` after PreCodegen
|
||||
// MIR for `vec_move` after runtime-optimized
|
||||
|
||||
fn vec_move(_1: Vec<impl Sized>) -> () {
|
||||
debug v => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `match1` after PreCodegen
|
||||
// MIR for `match1` after runtime-optimized
|
||||
|
||||
fn match1(_1: bool, _2: i32, _3: i32) -> i32 {
|
||||
debug c => _1;
|
||||
@@ -1,6 +1,6 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR matchbr.match1.PreCodegen.after.mir
|
||||
// EMIT_MIR matchbr.match1.runtime-optimized.after.mir
|
||||
pub fn match1(c: bool, v1: i32, v2: i32) -> i32 {
|
||||
// CHECK-LABEL: fn match1(
|
||||
// CHECK: bb0:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `issue_77355_opt` after PreCodegen
|
||||
// MIR for `issue_77355_opt` after runtime-optimized
|
||||
|
||||
fn issue_77355_opt(_1: Foo) -> u64 {
|
||||
debug num => _1;
|
||||
@@ -10,7 +10,7 @@ pub enum Foo {
|
||||
F,
|
||||
}
|
||||
|
||||
// EMIT_MIR matches_macro.issue_77355_opt.PreCodegen.after.mir
|
||||
// EMIT_MIR matches_macro.issue_77355_opt.runtime-optimized.after.mir
|
||||
fn issue_77355_opt(num: Foo) -> u64 {
|
||||
// CHECK-LABEL: fn issue_77355_opt(
|
||||
// CHECK: switchInt({{.*}}) -> [1: bb1, 2: bb1, otherwise: bb2];
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `manual_replace` after PreCodegen
|
||||
// MIR for `manual_replace` after runtime-optimized
|
||||
|
||||
fn manual_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug r => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `manual_replace` after PreCodegen
|
||||
// MIR for `manual_replace` after runtime-optimized
|
||||
|
||||
fn manual_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug r => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `mem_replace` after PreCodegen
|
||||
// MIR for `mem_replace` after runtime-optimized
|
||||
|
||||
fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug r => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `mem_replace` after PreCodegen
|
||||
// MIR for `mem_replace` after runtime-optimized
|
||||
|
||||
fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug r => _1;
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR mem_replace.manual_replace.PreCodegen.after.mir
|
||||
// EMIT_MIR mem_replace.manual_replace.runtime-optimized.after.mir
|
||||
pub fn manual_replace(r: &mut u32, v: u32) -> u32 {
|
||||
let temp = *r;
|
||||
*r = v;
|
||||
temp
|
||||
}
|
||||
|
||||
// EMIT_MIR mem_replace.mem_replace.PreCodegen.after.mir
|
||||
// EMIT_MIR mem_replace.mem_replace.runtime-optimized.after.mir
|
||||
pub fn mem_replace(r: &mut u32, v: u32) -> u32 {
|
||||
std::mem::replace(r, v)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir
|
||||
// EMIT_MIR no_inlined_clone.{impl#0}-clone.runtime-optimized.after.mir
|
||||
|
||||
// CHECK-LABEL: ::clone(
|
||||
// CHECK-NOT: inlined clone::impls::<impl Clone for {{.*}}>::clone
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `<impl at $DIR/no_inlined_clone.rs:9:10: 9:15>::clone` after PreCodegen
|
||||
// MIR for `<impl at $DIR/no_inlined_clone.rs:9:10: 9:15>::clone` after runtime-optimized
|
||||
|
||||
fn <impl at $DIR/no_inlined_clone.rs:9:10: 9:15>::clone(_1: &Foo) -> Foo {
|
||||
debug self => _1;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// MIR for `main` after PreCodegen
|
||||
// MIR for `main` after runtime-optimized
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user