Updated slice tests to pass for big endian hosts for multiple-option-or-permutations.rs#151780
Conversation
| // CHECK-NEXT: [[R:%.+]] = select i1 [[SOME_A]], i16 %0, i16 %1 | ||
| // CHECK: ret i16 [[R]] | ||
| // CHECK-DAG: [[SOME_A:%.+]] = trunc i16 {{.*}} to i1 | ||
| // CHECK-DAG: select i1 [[SOME_A]], i16 %0, i16 %1 |
There was a problem hiding this comment.
I don't think the use of CHECK-DAG here makes sense, as these instructions can only occur in this order (one depends on the other). Possibly you meant just CHECK?
There was a problem hiding this comment.
Yes, in retrospect CHECK-DAG isn't good here, I will refactor to use revisions and subsequently use LITTLE-NEXT, BIG-X.
| // CHECK: ret i16 [[R]] | ||
| // CHECK-DAG: [[SOME_A:%.+]] = trunc i16 {{.*}} to i1 | ||
| // CHECK-DAG: select i1 [[SOME_A]], i16 %0, i16 %1 | ||
| // CHECK: ret i16 {{.*}} |
There was a problem hiding this comment.
This change to not say what's being returned feels like it's just making it a worse test. Notably, sure it's passing, but you needed to do this because there's two selects in the BE version, and failing if the LE version started doing that is good if you ask me.
I think it'd be better to use revisions to make these LITTLE-NEXT and add separate BIG-WHATEVER checks for the big-endian versions if they're this different.
There was a problem hiding this comment.
Agreed, when writing this I wasn't too happy that it wasn't exhaustively checking the BE output, whilst simultaneously making the LE test worse.
I'm currently working through using revisions, my current iteration looking like the following, using only-endian-big and ignore-endian-big to select the desired revision:
//@ revisions: LITTLE BIG
//@ [BIG] only-endian-big
//@ [LITTLE] ignore-endian-bigThe only problem is that the only-endian-big doesn't exist in directive_names.rs, but it's still a valid directive according to the test directive docs.
Would it be appropriate to add only-endian-big to directive_names.rs in this PR?
|
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
61d5d8e to
5265ee0
Compare
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready Apologies for the delay in fixing this, I have added |
|
Heya, just chiming in again to confirm that the updated version still passes tests on big endian hosts :) |
|
Gentle ping, the testsuite is still broken on big endian targets without this patch |
|
Filed llvm/llvm-project#184131 for the missing optimization on big endian. |
|
@bors r+ |
…s, r=nikic Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs` It was discovered that the FileCheck tests when performing an `Option::or` operation on a slice was failing when tested on a big endian host. The compiler explorer link is here outlining the codegen output differences - https://rust.godbolt.org/z/qdE7d3G4f This MR relaxes the constraints for the `*slice_u8` variants of the test (by changing `CHECK-NEXT` to `CHECK-DAG`), whilst still maintaining the check for the necessary `or` logic. Huge thanks to @Gelbpunkt for identifying this issue! It has been confirmed that this fix passes on a big endian target now as well. Closes rust-lang#151718
…uwer Rollup of 5 pull requests Successful merges: - #153153 (add tests for thumb interworking) - #149328 (Add `String<A>` type with custom allocator parameter) - #151780 (Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs`) - #153015 (core: make atomic primitives type aliases of `Atomic<T>`) - #153292 (tests: codegen-llvm: vec-calloc: do not require the uwtable attribute) Failed merges: - #151864 (Implement AST -> HIR generics propagation in delegation)
…s, r=nikic Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs` It was discovered that the FileCheck tests when performing an `Option::or` operation on a slice was failing when tested on a big endian host. The compiler explorer link is here outlining the codegen output differences - https://rust.godbolt.org/z/qdE7d3G4f This MR relaxes the constraints for the `*slice_u8` variants of the test (by changing `CHECK-NEXT` to `CHECK-DAG`), whilst still maintaining the check for the necessary `or` logic. Huge thanks to @Gelbpunkt for identifying this issue! It has been confirmed that this fix passes on a big endian target now as well. Closes rust-lang#151718
…uwer Rollup of 9 pull requests Successful merges: - #153153 (add tests for thumb interworking) - #149328 (Add `String<A>` type with custom allocator parameter) - #151780 (Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs`) - #151962 (Fix next-solver ICE on PointeeSized goals) - #153015 (core: make atomic primitives type aliases of `Atomic<T>`) - #153161 (Rejig `rustc_with_all_queries!`) - #153191 ( don't emit `unused_results` lint for tuples of "trivial" types ) - #153273 (vec/mod.rs: add missing period in "ie." in docs) - #153292 (tests: codegen-llvm: vec-calloc: do not require the uwtable attribute)
…s, r=nikic Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs` It was discovered that the FileCheck tests when performing an `Option::or` operation on a slice was failing when tested on a big endian host. The compiler explorer link is here outlining the codegen output differences - https://rust.godbolt.org/z/qdE7d3G4f This MR relaxes the constraints for the `*slice_u8` variants of the test (by changing `CHECK-NEXT` to `CHECK-DAG`), whilst still maintaining the check for the necessary `or` logic. Huge thanks to @Gelbpunkt for identifying this issue! It has been confirmed that this fix passes on a big endian target now as well. Closes rust-lang#151718
…uwer Rollup of 11 pull requests Successful merges: - #153153 (add tests for thumb interworking) - #149328 (Add `String<A>` type with custom allocator parameter) - #151780 (Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs`) - #151962 (Fix next-solver ICE on PointeeSized goals) - #153015 (core: make atomic primitives type aliases of `Atomic<T>`) - #153161 (Rejig `rustc_with_all_queries!`) - #153191 ( don't emit `unused_results` lint for tuples of "trivial" types ) - #153273 (vec/mod.rs: add missing period in "ie." in docs) - #153292 (tests: codegen-llvm: vec-calloc: do not require the uwtable attribute) - #153293 (library: std: process: skip tests on Hermit) - #153301 (Do not ping kobzol on rustc-dev-guide changes)
…uwer Rollup of 10 pull requests Successful merges: - #153153 (add tests for thumb interworking) - #151780 (Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs`) - #151962 (Fix next-solver ICE on PointeeSized goals) - #153015 (core: make atomic primitives type aliases of `Atomic<T>`) - #153161 (Rejig `rustc_with_all_queries!`) - #153191 ( don't emit `unused_results` lint for tuples of "trivial" types ) - #153273 (vec/mod.rs: add missing period in "ie." in docs) - #153292 (tests: codegen-llvm: vec-calloc: do not require the uwtable attribute) - #153293 (library: std: process: skip tests on Hermit) - #153301 (Do not ping kobzol on rustc-dev-guide changes)
It was discovered that the FileCheck tests when performing an
Option::oroperation on a slice was failing when tested on a big endian host.The compiler explorer link is here outlining the codegen output differences - https://rust.godbolt.org/z/qdE7d3G4f
This MR relaxes the constraints for the
*slice_u8variants of the test (by changingCHECK-NEXTtoCHECK-DAG), whilst still maintaining the check for the necessaryorlogic.Huge thanks to @Gelbpunkt for identifying this issue! It has been confirmed that this fix passes on a big endian target now as well.
Closes #151718