Skip to content

Commit

Permalink
Rollup merge of #99510 - krasimirgg:movb, r=nikic
Browse files Browse the repository at this point in the history
adapt assembly/static-relocation-model test for LLVM change

After llvm/llvm-project@f0dd12e LLVM emits `movzbl` instead. Adapted this test case accordingly.

Discovered in our experimental rust + llvm at head ci:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12104#0182195b-8791-4f88-853c-bb23a1e4b54c
  • Loading branch information
matthiaskrgr authored Jul 20, 2022
2 parents 4b21ad2 + dcd02ab commit 2638f3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/assembly/static-relocation-model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ extern "C" {
}

// CHECK-LABEL: banana:
// x64: movb chaenomeles{{(\(%[a-z0-9]+\))?}}, %{{[a-z0-9]+}}
// On the next line LLVM 14 produces a `movb`, whereas LLVM 15+ produces a `movzbl`.
// x64: {{movb|movzbl}} chaenomeles{{(\(%[a-z0-9]+\))?}}, %{{[a-z0-9]+}}
// A64: adrp [[REG:[a-z0-9]+]], chaenomeles
// A64-NEXT: ldrb {{[a-z0-9]+}}, {{\[}}[[REG]], :lo12:chaenomeles]
#[no_mangle]
Expand All @@ -47,7 +48,7 @@ pub fn banana() -> u8 {
}

// CHECK-LABEL: peach:
// x64: movb banana{{(\(%[a-z0-9]+\))?}}, %{{[a-z0-9]+}}
// x64: {{movb|movzbl}} banana{{(\(%[a-z0-9]+\))?}}, %{{[a-z0-9]+}}
// A64: adrp [[REG2:[a-z0-9]+]], banana
// A64-NEXT: ldrb {{[a-z0-9]+}}, {{\[}}[[REG2]], :lo12:banana]
#[no_mangle]
Expand All @@ -59,7 +60,7 @@ pub fn peach() -> u8 {

// CHECK-LABEL: mango:
// x64: movq EXOCHORDA{{(\(%[a-z0-9]+\))?}}, %[[REG:[a-z0-9]+]]
// x64-NEXT: movb (%[[REG]]), %{{[a-z0-9]+}}
// x64-NEXT: {{movb|movzbl}} (%[[REG]]), %{{[a-z0-9]+}}
// A64: adrp [[REG2:[a-z0-9]+]], EXOCHORDA
// A64-NEXT: ldr {{[a-z0-9]+}}, {{\[}}[[REG2]], :lo12:EXOCHORDA]
#[no_mangle]
Expand Down

0 comments on commit 2638f3a

Please sign in to comment.