Revert "comment out the old tests instead of adjusting them"
This reverts commit 906f66fb4c
.
This commit is contained in:
parent
7830406df1
commit
7e0463fe93
8 changed files with 48 additions and 49 deletions
|
@ -140,19 +140,17 @@ Number of file 0 mappings: 6
|
|||
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
|
||||
Highest counter ID seen: c1
|
||||
|
||||
Function name: closure::main::{closure#18}
|
||||
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 19, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
|
||||
Function name: closure::main::{closure#18} (unused)
|
||||
Raw bytes (24): 0x[01, 01, 00, 04, 00, 19, 0d, 02, 1c, 00, 02, 1d, 02, 12, 00, 02, 11, 00, 12, 00, 01, 11, 01, 0e]
|
||||
Number of files: 1
|
||||
- file 0 => global file 1
|
||||
Number of expressions: 1
|
||||
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
||||
Number of expressions: 0
|
||||
Number of file 0 mappings: 4
|
||||
- Code(Counter(0)) at (prev + 25, 13) to (start + 2, 28)
|
||||
- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18)
|
||||
- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 18)
|
||||
= (c0 - c1)
|
||||
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 14)
|
||||
Highest counter ID seen: c1
|
||||
- Code(Zero) at (prev + 25, 13) to (start + 2, 28)
|
||||
- Code(Zero) at (prev + 2, 29) to (start + 2, 18)
|
||||
- Code(Zero) at (prev + 2, 17) to (start + 0, 18)
|
||||
- Code(Zero) at (prev + 1, 17) to (start + 1, 14)
|
||||
Highest counter ID seen: (none)
|
||||
|
||||
Function name: closure::main::{closure#19}
|
||||
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 43, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
|
||||
|
|
|
@ -6,7 +6,6 @@ static FOO: u8 = 2;
|
|||
fn main() {
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug x => [[x:_.*]];
|
||||
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
|
||||
// COM: CHECK: [[x]] = const 4_u8;
|
||||
// CHECK-NOT: [[x]] = const 4_u8;
|
||||
let x = FOO + FOO;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
fn main() {
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug a => [[a:_.*]];
|
||||
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
|
||||
// COM: CHECK: [[a]] = const 5_i32;
|
||||
// CHECK-NOT: [[a]] = const 5_i32;
|
||||
let a = *(&(4, 5).1);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@ fn main() {
|
|||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug a => [[a:_.*]];
|
||||
// CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize, AsCast));
|
||||
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
|
||||
// COM: CHECK: assert(const true,
|
||||
// COM: CHECK: [[a]] = const 2_u32;
|
||||
// CHECK-NOT: assert(const true,
|
||||
// CHECK-NOT: [[a]] = const 2_u32;
|
||||
let a = (&[1u32, 2, 3] as &[u32])[1];
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
let mut _3: fn(u8) -> u8;
|
||||
let _5: ();
|
||||
let mut _6: fn(u8) -> u8;
|
||||
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
let _10: ();
|
||||
let mut _11: fn();
|
||||
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
let _14: ();
|
||||
let mut _15: fn();
|
||||
scope 1 {
|
||||
|
@ -19,7 +19,7 @@
|
|||
let _4: fn(u8) -> u8;
|
||||
scope 2 {
|
||||
debug g => _4;
|
||||
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
scope 3 {
|
||||
debug closure => _7;
|
||||
let _8: fn();
|
||||
|
@ -62,16 +62,16 @@
|
|||
StorageDead(_6);
|
||||
StorageDead(_5);
|
||||
- StorageLive(_7);
|
||||
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
- StorageLive(_8);
|
||||
+ nop;
|
||||
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ nop;
|
||||
StorageLive(_9);
|
||||
- _9 = copy _7;
|
||||
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
StorageDead(_9);
|
||||
StorageLive(_10);
|
||||
StorageLive(_11);
|
||||
|
@ -88,8 +88,8 @@
|
|||
StorageLive(_13);
|
||||
- _13 = copy _7;
|
||||
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
StorageDead(_13);
|
||||
StorageLive(_14);
|
||||
StorageLive(_15);
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
let mut _3: fn(u8) -> u8;
|
||||
let _5: ();
|
||||
let mut _6: fn(u8) -> u8;
|
||||
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
let _10: ();
|
||||
let mut _11: fn();
|
||||
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
let _14: ();
|
||||
let mut _15: fn();
|
||||
scope 1 {
|
||||
|
@ -19,7 +19,7 @@
|
|||
let _4: fn(u8) -> u8;
|
||||
scope 2 {
|
||||
debug g => _4;
|
||||
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
scope 3 {
|
||||
debug closure => _7;
|
||||
let _8: fn();
|
||||
|
@ -62,16 +62,16 @@
|
|||
StorageDead(_6);
|
||||
StorageDead(_5);
|
||||
- StorageLive(_7);
|
||||
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
- StorageLive(_8);
|
||||
+ nop;
|
||||
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ nop;
|
||||
StorageLive(_9);
|
||||
- _9 = copy _7;
|
||||
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
StorageDead(_9);
|
||||
StorageLive(_10);
|
||||
StorageLive(_11);
|
||||
|
@ -88,8 +88,8 @@
|
|||
StorageLive(_13);
|
||||
- _13 = copy _7;
|
||||
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
|
||||
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
|
||||
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
|
||||
StorageDead(_13);
|
||||
StorageLive(_14);
|
||||
StorageLive(_15);
|
||||
|
|
|
@ -100,17 +100,18 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
|
|||
opaque((x * y) - y);
|
||||
|
||||
// We cannot substitute through an immutable reference.
|
||||
// (Disabled due to <https://github.com/rust-lang/rust/issues/130853>)
|
||||
// CHECK: [[ref:_.*]] = &_3;
|
||||
// CHECK: [[deref:_.*]] = copy (*[[ref]]);
|
||||
// COM: CHECK: [[addref:_.*]] = Add(copy [[deref]], copy _1);
|
||||
// COM: CHECK: opaque::<u64>(copy [[addref]])
|
||||
// COM: CHECK: opaque::<u64>(copy [[addref]])
|
||||
// CHECK: [[addref:_.*]] = Add(move [[deref]], copy _1);
|
||||
// CHECK: opaque::<u64>(move [[addref]])
|
||||
// CHECK: [[deref2:_.*]] = copy (*[[ref]]);
|
||||
// CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
|
||||
// CHECK: opaque::<u64>(move [[addref2]])
|
||||
let a = &z;
|
||||
opaque(*a + x);
|
||||
opaque(*a + x);
|
||||
|
||||
// And certainly not through a mutable reference or a pointer.
|
||||
// But not through a mutable reference or a pointer.
|
||||
// CHECK: [[mut:_.*]] = &mut _3;
|
||||
// CHECK: [[addmut:_.*]] = Add(
|
||||
// CHECK: opaque::<u64>(move [[addmut]])
|
||||
|
@ -142,9 +143,11 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
|
|||
// Important: `e` is not `a`!
|
||||
// CHECK: [[ref2:_.*]] = &_3;
|
||||
// CHECK: [[deref2:_.*]] = copy (*[[ref2]]);
|
||||
// COM: CHECK: [[addref2:_.*]] = Add(copy [[deref2]], copy _1);
|
||||
// COM: CHECK: opaque::<u64>(copy [[addref2]])
|
||||
// COM: CHECK: opaque::<u64>(copy [[addref2]])
|
||||
// CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
|
||||
// CHECK: opaque::<u64>(move [[addref2]])
|
||||
// CHECK: [[deref3:_.*]] = copy (*[[ref2]]);
|
||||
// CHECK: [[addref3:_.*]] = Add(move [[deref3]], copy _1);
|
||||
// CHECK: opaque::<u64>(move [[addref3]])
|
||||
let e = &z;
|
||||
opaque(*e + x);
|
||||
opaque(*e + x);
|
||||
|
@ -499,8 +502,9 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
|
|||
// Do not reuse dereferences of `&Freeze`.
|
||||
// CHECK: [[ref:_.*]] = &(*_1);
|
||||
// CHECK: [[st7:_.*]] = copy (*[[ref]]);
|
||||
// COM: CHECK: opaque::<u32>(copy [[st7]])
|
||||
// COM: CHECK: opaque::<u32>(copy [[st7]])
|
||||
// CHECK: opaque::<u32>(move [[st7]])
|
||||
// CHECK: [[st8:_.*]] = copy (*[[ref]]);
|
||||
// CHECK: opaque::<u32>(move [[st8]])
|
||||
let z = &*t;
|
||||
opaque(*z);
|
||||
opaque(*z);
|
||||
|
@ -519,8 +523,9 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
|
|||
|
||||
// `*s` is not Copy, but `(*s).0` is, but we still cannot reuse.
|
||||
// CHECK: [[st10:_.*]] = copy ((*_3).0: u32);
|
||||
// COM: CHECK: opaque::<u32>(copy [[st10]])
|
||||
// COM: CHECK: opaque::<u32>(copy [[st10]])
|
||||
// CHECK: opaque::<u32>(move [[st10]])
|
||||
// CHECK: [[st11:_.*]] = copy ((*_3).0: u32);
|
||||
// CHECK: opaque::<u32>(move [[st11]])
|
||||
opaque(s.0);
|
||||
opaque(s.0);
|
||||
}
|
||||
|
@ -737,7 +742,7 @@ fn borrowed<T: Copy + Freeze>(x: T) {
|
|||
// CHECK: bb1: {
|
||||
// CHECK-NEXT: _0 = opaque::<T>(copy _1)
|
||||
// CHECK: bb2: {
|
||||
// COM: CHECK-NEXT: _0 = opaque::<T>(copy _1)
|
||||
// CHECK-NEXT: _0 = opaque::<T>(copy (*_3))
|
||||
mir! {
|
||||
{
|
||||
let a = x;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//! Regression test for <https://github.com/rust-lang/rust/issues/130853>
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
fn src(x: &&u8) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue