Skip to content

[DNM] [rebranch] Adjust some tests to pass again #81190

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

Open
wants to merge 10 commits into
base: rebranch
Choose a base branch
from

Conversation

AnthonyLatsis
Copy link
Collaborator

No description provided.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis AnthonyLatsis requested a review from bnbarham April 30, 2025 06:54
@AnthonyLatsis

This comment was marked as duplicate.

1 similar comment
@AnthonyLatsis
Copy link
Collaborator Author

swiftlang/llvm-project#10599

@swift-ci please smoke test macOS

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you

@bnbarham
Copy link
Contributor

bnbarham commented May 2, 2025

@aschwaighofer do we actually care about checking for captures(none) and nuw? I mostly ask because it would be nice if we could avoid main conflicts here, which we could do if we used {{.*}} rather than the actual checks.

Per 7eca38ce76d5d1915f4ab7e665964062c0b37697 (llvm-project).
…ign`

Per b7db403e701029c801fd990dceeb219de9fb800c (llvm-project).
…(none)`

Per 29441e4f5fa5f5c7709f7cf180815ba97f611297 (llvm-project).
The current regex does not match a ')' inside the argument list. This
no longer works because `nocapture` became `captures(none) in
29441e4f5fa5f5c7709f7cf180815ba97f611297 (llvm-project). Use a wildcard
regex instead. This is fine because the `unnamed_addr` attribute the
test is guarding against can only appear after the argument list.
…er attribute

The `initializes` parameter attribute was introduced in
5ece35df8586d0cb8c104a9f44eaae771de025f5 (llvm-project). The lowered
function bodies indicate that the attribute is correct.

Match the attribute using a wildcard regex because it appears only in
-O mode and is not relevant to these tests.
The new attribute is `captures(ret: address, provenance)`. This
attribute is expected because these functions either immediately return
the pointer argument or pass it as an argument to another such
parameter.

Match it using a wildcard regex

See https://llvm.org/docs/LangRef.html#parameter-attributes.
The new attribute is `range(i8 -127, -128)`. The documentation specifies
that the range can wrap, meaning that for i8 [-127, -128) is equivalent
to [-127, 127). This is expected for a function that simply increments a
i8 value.

Match the attribute using a wildcard regex because it appears only in -O
mode and is not relevant to the test.

See https://llvm.org/docs/LangRef.html#parameter-attributes.
…hanged

`alias nocapture swiftself` -> `alias swiftself captures(none)`.

`nocapture` became `captures(none) in
29441e4f5fa5f5c7709f7cf180815ba97f611297 (llvm-project).
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test macOS

@AnthonyLatsis AnthonyLatsis changed the title [rebranch] Adjust some tests to pass again [DNM] [rebranch] Adjust some tests to pass again May 4, 2025
@@ -24,7 +24,7 @@ func foo(_ x: inout Int64) {
// IRCHECK-NEXT: call void @llvm.memset.{{.*}}(ptr align {{(4|8)}} %[[X]], i8 0
// IRCHECK: store ptr %0, ptr %[[X]], align {{(4|8)}}
// IRCHECK-SAME: !dbg ![[LOC0:.*]]
// IRCHECK-NEXT: %[[VALUE:.*]] = getelementptr inbounds %Ts5Int64V, ptr %0, i32 0, i32 0,
// IRCHECK-NEXT: %[[VALUE:.*]] = getelementptr inbounds nuw %Ts5Int64V, ptr %0, i32 0, i32 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants