Repository navigation
Add test for issue 106269 - #124299
Merged
Merged
Add test for issue 106269#124299
Conversation
commented
Apr 23, 2024
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
commented
Apr 27, 2024
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?) |
rust-cloud-vms
Bot
force-pushed
the
106269-test
branch
from
April 28, 2024 11:23
1af717d to
11b0e9a
Compare
commented
Apr 28, 2024
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
} |
commented
Apr 29, 2024
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. |
commented
Apr 29, 2024
Collaborator
commented
Apr 29, 2024
Collaborator
This comment has been minimized.
This comment has been minimized.
commented
Apr 29, 2024
Collaborator
|
💔 Test failed - checks-actions |
rust-cloud-vms
Bot
force-pushed
the
106269-test
branch
from
April 30, 2024 13:21
11b0e9a to
7032c92
Compare
commented
Apr 30, 2024
Contributor
Author
|
Looks like there's always a for code on Darwin @bors r=nikic |
commented
Apr 30, 2024
Collaborator
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