Merged
Conversation
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
Member
|
r? @nikic since #106269 (comment) sounded to me like there might be a better way to test here (e.g., detecting the memcmp somehow?) |
1af717d to
11b0e9a
Compare
Contributor
Author
|
The IR looks like this - it's only during codegen that it can be turned into a single comparison define noundef zeroext i1 @eq1(ptr noalias nocapture noundef readonly align 1 dereferenceable(4) %s1, ptr noalias nocapture noundef readonly align 1 dereferenceable(4) %s2) unnamed_addr {
start:
%_4 = load i8, ptr %s1, align 1
%_5 = load i8, ptr %s2, align 1
%_3 = icmp eq i8 %_4, %_5
br i1 %_3, label %bb1, label %bb8
bb1:
%0 = getelementptr inbounds i8, ptr %s1, i64 1
%_7 = load i8, ptr %0, align 1
%1 = getelementptr inbounds i8, ptr %s2, i64 1
%_8 = load i8, ptr %1, align 1
%_6 = icmp eq i8 %_7, %_8
br i1 %_6, label %bb2, label %bb8
bb2:
%2 = getelementptr inbounds i8, ptr %s1, i64 2
%_10 = load i8, ptr %2, align 1
%3 = getelementptr inbounds i8, ptr %s2, i64 2
%_11 = load i8, ptr %3, align 1
%_9 = icmp eq i8 %_10, %_11
br i1 %_9, label %bb3, label %bb8
bb3:
%4 = getelementptr inbounds i8, ptr %s1, i64 3
%_12 = load i8, ptr %4, align 1
%5 = getelementptr inbounds i8, ptr %s2, i64 3
%_13 = load i8, ptr %5, align 1
%6 = icmp eq i8 %_12, %_13
br label %bb8
bb8:
%_0.sroa.0.0 = phi i1 [ %6, %bb3 ], [ false, %bb2 ], [ false, %bb1 ], [ false, %start ]
ret i1 %_0.sroa.0.0
} |
Contributor
|
@bors r+ rollup=iffy Assembly tests are the best we can do for this right now. After llvm/llvm-project#77370 we'd be able to use IR tests for these. |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 29, 2024
Add test for issue 106269 Closes rust-lang#106269 Made this an assembly test as the LLVM codegen is still quite verbose and doesn't really indicate the behaviour we want
Collaborator
This comment has been minimized.
This comment has been minimized.
Collaborator
|
💔 Test failed - checks-actions |
11b0e9a to
7032c92
Compare
Contributor
Author
|
Looks like there's always a for code on Darwin @bors r=nikic |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 30, 2024
Rollup of 4 pull requests Successful merges: - rust-lang#124280 (Port repr128-dwarf run-make test to rmake) - rust-lang#124299 (Add test for issue 106269) - rust-lang#124553 (Write `git-commit-{sha,info}` for Cargo in source tarballs) - rust-lang#124561 (Add `normalize()` in run-make `Diff` type) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 30, 2024
Rollup merge of rust-lang#124299 - clubby789:106269-test, r=nikic Add test for issue 106269 Closes rust-lang#106269 Made this an assembly test as the LLVM codegen is still quite verbose and doesn't really indicate the behaviour we want
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #106269
Made this an assembly test as the LLVM codegen is still quite verbose and doesn't really indicate the behaviour we want