Skip to content

Commit

Permalink
Rollup merge of #100052 - TimNN:patch-1, r=nikic
Browse files Browse the repository at this point in the history
RISC-V ASM test: relax label name constraint.

The test is currently [broken at LLVM Head](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12425#01825d5b-c3d1-4fdc-a98d-5956b246aee2), likely since llvm/llvm-project@260a641:

```plain
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/src/test/assembly/asm/riscv-types.rs:59:11: error: CHECK: expected string not found in input
--
  | // CHECK: lb t0, %pcrel_lo(.Lpcrel_hi0)(t0)
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/asm/riscv-types.riscv64/riscv-types.s:24:36: note: scanning from here
  | auipc t0, %pcrel_hi(extern_static)
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/asm/riscv-types.riscv64/riscv-types.s:25:2: note: possible intended match here
  | lb t0, %pcrel_lo(.Lpcrel_hi18)(t0)
  | ^
```

As far as I can tell, the exact index in the label probably doesn't matter for the test, especially if LLVM can change it to ~arbitrary values, though I'm not an ASM or RISC-V expert.

This [fixes the test](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12427).
  • Loading branch information
matthiaskrgr authored Aug 2, 2022
2 parents 06333e0 + efa9586 commit 0b3bbe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/assembly/asm/riscv-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub unsafe fn sym_fn() {
// CHECK-LABEL: sym_static:
// CHECK: #APP
// CHECK: auipc t0, %pcrel_hi(extern_static)
// CHECK: lb t0, %pcrel_lo(.Lpcrel_hi0)(t0)
// CHECK: lb t0, %pcrel_lo(.Lpcrel_hi{{[0-9]+}})(t0)
// CHECK: #NO_APP
#[no_mangle]
pub unsafe fn sym_static() {
Expand Down

0 comments on commit 0b3bbe6

Please sign in to comment.