Skip to content
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

small_data_threshold.rs: Adapt to LLVM head changes #130267

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/assembly/small_data_threshold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static mut Z: u64 = 0;
// Currently, only MIPS and RISCV successfully put any objects in the small data
// sections so the U/V/W/X tests are skipped on Hexagon and M68K

//@ RISCV: .section .sdata,
//@ RISCV: .section .sdata
Copy link
Contributor

Choose a reason for hiding this comment

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

The current (expected) output looks like

.section .sdata,"aw",@progbits

The new LLVM output appears to include the variable name as part of the section name, e.g. .sdata.U for variable U.

For now (dealing with both current and future LLVM behaviour) this change makes sense, but once the new LLVM is part of the regular build (when will that likely be?) we should update the test to match the full section names, something like

//@ RISCV: .section .sdata.U,

(and the other similar match lines).

That's better than was possible with the old LLVM version, as it ensures that we're matching against the .sdata section specifically for the variable U.

Copy link
Contributor

Choose a reason for hiding this comment

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

when will that likely be?

In about half a year.

We could use .section .sdata{{(\.U)?}}, here, but not sure it's really better than just dropping the comma.

//@ RISCV-NOT: .section
//@ RISCV: U:
//@ RISCV: .section .sbss
Expand All @@ -71,7 +71,7 @@ static mut Z: u64 = 0;
//@ RISCV-NOT: .section
//@ RISCV: X:

//@ MIPS: .section .sdata,
//@ MIPS: .section .sdata
//@ MIPS-NOT: .section
//@ MIPS: U:
//@ MIPS: .section .sbss
Expand Down
Loading