-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mir-opt tests fail on big endian #126261
Comments
Something peculiar about many of these tests is that transforms seem to create ALLOCs that are not actually referenced by MIR. Is that expected? In terms of fixing this, the existing approach of picking constants that are endianness-independent doesn't seem very scalable. Maybe it would make sense to have a flag that disables dumping the contents of allocations? I think that for most of these tests they are not relevant (especially as the allocations are unused in the first place). |
This appears to be an intermediate result of the optimization process, such as: https://rust.godbolt.org/z/ohz1YMqez (tests/mir-opt/const_prop/slice_len.rs).
There is an option |
If these tests don't actually care about the raw bytes in their UI comparisons, then they can use |
Rather than trying to normalize output, I'm proposing an option in #126502 to skip the raw bytes altogether. |
…es, r=estebank Ignore allocation bytes in some mir-opt tests This adds `rustc -Zdump-mir-exclude-alloc-bytes` to skip writing allocation bytes in MIR dumps, and applies it to tests that were failing on s390x due to its big-endian byte order. Fixes rust-lang#126261
Rollup merge of rust-lang#126502 - cuviper:dump-mir-exclude-alloc-bytes, r=estebank Ignore allocation bytes in some mir-opt tests This adds `rustc -Zdump-mir-exclude-alloc-bytes` to skip writing allocation bytes in MIR dumps, and applies it to tests that were failing on s390x due to its big-endian byte order. Fixes rust-lang#126261
Huh, looks like a new instance has crept in just as the PR was merged. I'm now seeing a new test fail:
|
Following on PR rust-lang#126502, add `rustc -Zdump-mir-exclude-alloc-bytes` to tests/mir-opt/dataflow-const-prop/aggregate_copy.rs as well to skip writing allocation bytes in MIR dumps. Fixes rust-lang#126261
…rk-Simulacrum Ignore allocation bytes in one more mir-opt test Following on PR rust-lang#126502, add `rustc -Zdump-mir-exclude-alloc-bytes` to tests/mir-opt/dataflow-const-prop/aggregate_copy.rs as well to skip writing allocation bytes in MIR dumps. Fixes rust-lang#126261
Rollup merge of rust-lang#127752 - uweigand:s390x-miropt-update, r=Mark-Simulacrum Ignore allocation bytes in one more mir-opt test Following on PR rust-lang#126502, add `rustc -Zdump-mir-exclude-alloc-bytes` to tests/mir-opt/dataflow-const-prop/aggregate_copy.rs as well to skip writing allocation bytes in MIR dumps. Fixes rust-lang#126261
A number of mir-opt tests fail on s390x, which is a big endian architecture. Failures for 1.79:
Some previous fixes for such failures were #115167 and #106046.
The text was updated successfully, but these errors were encountered: