Skip to content

Commit

Permalink
Tweak test to avoid platform dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Oct 24, 2023
1 parent 8c1b039 commit 9c85dfa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let mut _26: &&BigStruct;
let mut _28: f32;
let mut _29: std::option::Option<S>;
let mut _30: &[f64];
let mut _30: &[f32];
let mut _31: &SmallStruct;
let mut _32: &SmallStruct;
let mut _33: &SmallStruct;
Expand Down Expand Up @@ -52,14 +52,14 @@
debug ss => _15;
let _19: f32;
let _20: std::option::Option<S>;
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<S>;
let _25: &[f64];
let _25: &[f32];
scope 8 {
debug a => _23;
debug b => _24;
Expand Down Expand Up @@ -146,7 +146,7 @@
StorageLive(_20);
_20 = (_22.1: std::option::Option<S>);
StorageLive(_21);
_21 = (_22.2: &[f64]);
_21 = (_22.2: &[f32]);
StorageDead(_22);
StorageLive(_26);
_26 = const {ALLOC5: &&BigStruct};
Expand All @@ -161,7 +161,7 @@
+ _24 = const Option::<S>::Some(S(35_i32));
StorageLive(_25);
_38 = deref_copy (*_26);
_25 = ((*_38).2: &[f64]);
_25 = ((*_38).2: &[f32]);
StorageDead(_26);
StorageLive(_27);
StorageLive(_28);
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let mut _26: &&BigStruct;
let mut _28: f32;
let mut _29: std::option::Option<S>;
let mut _30: &[f64];
let mut _30: &[f32];
let mut _31: &SmallStruct;
let mut _32: &SmallStruct;
let mut _33: &SmallStruct;
Expand Down Expand Up @@ -52,14 +52,14 @@
debug ss => _15;
let _19: f32;
let _20: std::option::Option<S>;
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<S>;
let _25: &[f64];
let _25: &[f32];
scope 8 {
debug a => _23;
debug b => _24;
Expand Down Expand Up @@ -146,7 +146,7 @@
StorageLive(_20);
_20 = (_22.1: std::option::Option<S>);
StorageLive(_21);
_21 = (_22.2: &[f64]);
_21 = (_22.2: &[f32]);
StorageDead(_22);
StorageLive(_26);
_26 = const {ALLOC5: &&BigStruct};
Expand All @@ -161,7 +161,7 @@
+ _24 = const Option::<S>::Some(S(35_i32));
StorageLive(_25);
_38 = deref_copy (*_26);
_25 = ((*_38).2: &[f64]);
_25 = ((*_38).2: &[f32]);
StorageDead(_26);
StorageLive(_27);
StorageLive(_28);
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tests/mir-opt/dataflow-const-prop/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct S(i32);
struct SmallStruct(f32, Option<S>, &'static [f32]);

#[derive(Copy, Clone)]
struct BigStruct(f32, Option<S>, &'static [f64]);
struct BigStruct(f32, Option<S>, &'static [f32]);

// EMIT_MIR struct.main.DataflowConstProp.diff
fn main() {
Expand Down

0 comments on commit 9c85dfa

Please sign in to comment.