From 9c85dfa1d755004b5499f45e2fd921c298f90a2e Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 24 Oct 2023 15:16:51 +0000 Subject: [PATCH] Tweak test to avoid platform dependency. --- .../struct.main.DataflowConstProp.32bit.diff | 14 +++++++------- .../struct.main.DataflowConstProp.64bit.diff | 14 +++++++------- tests/mir-opt/dataflow-const-prop/struct.rs | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff index 944b061f993..8499d0a89c3 100644 --- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff +++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff @@ -16,7 +16,7 @@ let mut _26: &&BigStruct; let mut _28: f32; let mut _29: std::option::Option; - let mut _30: &[f64]; + let mut _30: &[f32]; let mut _31: &SmallStruct; let mut _32: &SmallStruct; let mut _33: &SmallStruct; @@ -52,14 +52,14 @@ debug ss => _15; let _19: f32; let _20: std::option::Option; - let _21: &[f64]; + let _21: &[f32]; scope 7 { debug a => _19; debug b => _20; debug c => _21; let _23: f32; let _24: std::option::Option; - let _25: &[f64]; + let _25: &[f32]; scope 8 { debug a => _23; debug b => _24; @@ -146,7 +146,7 @@ StorageLive(_20); _20 = (_22.1: std::option::Option); StorageLive(_21); - _21 = (_22.2: &[f64]); + _21 = (_22.2: &[f32]); StorageDead(_22); StorageLive(_26); _26 = const {ALLOC5: &&BigStruct}; @@ -161,7 +161,7 @@ + _24 = const Option::::Some(S(35_i32)); StorageLive(_25); _38 = deref_copy (*_26); - _25 = ((*_38).2: &[f64]); + _25 = ((*_38).2: &[f32]); StorageDead(_26); StorageLive(_27); StorageLive(_28); @@ -228,8 +228,8 @@ 0x10 │ 00 00 a4 42 │ ...B } - ALLOC1 (size: 16, align: 4) { - 00 00 00 00 00 80 46 40 00 00 00 00 00 00 52 40 │ ......F@......R@ + ALLOC1 (size: 8, align: 4) { + 00 00 34 42 00 00 90 42 │ ..4B...B } ALLOC4 (static: SMALL_STAT, size: 4, align: 4) { diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff index c2c95657a2a..01ec3f623d1 100644 --- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff +++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff @@ -16,7 +16,7 @@ let mut _26: &&BigStruct; let mut _28: f32; let mut _29: std::option::Option; - let mut _30: &[f64]; + let mut _30: &[f32]; let mut _31: &SmallStruct; let mut _32: &SmallStruct; let mut _33: &SmallStruct; @@ -52,14 +52,14 @@ debug ss => _15; let _19: f32; let _20: std::option::Option; - let _21: &[f64]; + let _21: &[f32]; scope 7 { debug a => _19; debug b => _20; debug c => _21; let _23: f32; let _24: std::option::Option; - let _25: &[f64]; + let _25: &[f32]; scope 8 { debug a => _23; debug b => _24; @@ -146,7 +146,7 @@ StorageLive(_20); _20 = (_22.1: std::option::Option); StorageLive(_21); - _21 = (_22.2: &[f64]); + _21 = (_22.2: &[f32]); StorageDead(_22); StorageLive(_26); _26 = const {ALLOC5: &&BigStruct}; @@ -161,7 +161,7 @@ + _24 = const Option::::Some(S(35_i32)); StorageLive(_25); _38 = deref_copy (*_26); - _25 = ((*_38).2: &[f64]); + _25 = ((*_38).2: &[f32]); StorageDead(_26); StorageLive(_27); StorageLive(_28); @@ -228,8 +228,8 @@ 0x10 │ 02 00 00 00 00 00 00 00 00 00 a4 42 __ __ __ __ │ ...........B░░░░ } - ALLOC1 (size: 16, align: 8) { - 00 00 00 00 00 80 46 40 00 00 00 00 00 00 52 40 │ ......F@......R@ + ALLOC1 (size: 8, align: 4) { + 00 00 34 42 00 00 90 42 │ ..4B...B } ALLOC4 (static: SMALL_STAT, size: 8, align: 8) { diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs index 030f3c0c4de..043981a2954 100644 --- a/tests/mir-opt/dataflow-const-prop/struct.rs +++ b/tests/mir-opt/dataflow-const-prop/struct.rs @@ -9,7 +9,7 @@ struct S(i32); struct SmallStruct(f32, Option, &'static [f32]); #[derive(Copy, Clone)] -struct BigStruct(f32, Option, &'static [f64]); +struct BigStruct(f32, Option, &'static [f32]); // EMIT_MIR struct.main.DataflowConstProp.diff fn main() {