Fix tests for big-endian

The tests fail on s390x and presumably other big-endian systems, due
to check of raw alloc values in the MIR output.

To fix the tests remove the raw bytes from the MIR output
(via: compile-flags: -Zdump-mir-exclude-alloc-bytes) and update the
matching diffs.
This commit is contained in:
Eduard Stefes 2025-10-20 22:56:42 +02:00 committed by Eddy (Eduard) Stefes
parent bd4a8004c2
commit cbae95602f
6 changed files with 13 additions and 22 deletions

View file

@ -61,17 +61,11 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 4, align: 4) {
+ 00 00 00 00 │ ....
+ }
+
+ ALLOC1 (size: 4, align: 4) {
+ 04 00 00 00 │ ....
+ }
+
+ ALLOC2 (size: 4, align: 4) {
+ 01 00 11 00 │ ....
}
+
+ ALLOC0 (size: 4, align: 4) { .. }
+
+ ALLOC1 (size: 4, align: 4) { .. }
+
+ ALLOC2 (size: 4, align: 4) { .. }

View file

@ -1,6 +1,6 @@
// skip-filecheck
//@ test-mir-pass: GVN
//@ compile-flags: -Zmir-enable-passes=+RemoveZsts
//@ compile-flags: -Zmir-enable-passes=+RemoveZsts -Zdump-mir-exclude-alloc-bytes
// Verify that we can pretty print invalid constants.
#![feature(adt_const_params, unsized_const_params)]

View file

@ -34,9 +34,7 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 4, align: 4) {
+ 01 00 00 00 │ ....
}
+
+ ALLOC0 (size: 4, align: 4) { .. }

View file

@ -1,6 +1,6 @@
//! Tests that we can propagate into places that are projections into unions
//@ test-mir-pass: GVN
//@ compile-flags: -Zinline-mir
//@ compile-flags: -Zinline-mir -Zdump-mir-exclude-alloc-bytes
fn val() -> u32 {
1

View file

@ -107,9 +107,7 @@
StorageDead(_11);
goto -> bb4;
}
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 01 00 00 00 __ __ __ __ │ ....░░░░
}
+
+ ALLOC0 (size: 8, align: 4) { .. }

View file

@ -1,4 +1,5 @@
//@ test-mir-pass: GVN
//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
#![crate_type = "lib"]
#![feature(core_intrinsics, rustc_attrs)]