I don't see a way to write these tests so they can pass on both versions of LLVM, so for now I'm filing a bug. This patch would fix the broken tests:
diff --git a/tests/codegen-llvm/asm/global_asm.rs b/tests/codegen-llvm/asm/global_asm.rs
index 32075daa3cf..e8ffaa671d2 100644
--- a/tests/codegen-llvm/asm/global_asm.rs
+++ b/tests/codegen-llvm/asm/global_asm.rs
@@ -7,10 +7,9 @@
use std::arch::global_asm;
-// CHECK-LABEL: foo
// CHECK: module asm
-// this regex will capture the correct unconditional branch inst.
-// CHECK: module asm "{{[[:space:]]+}}jmp baz"
+// CHECK-LABEL: foo:
+// CHECK: "{{[[:space:]]+}}jmp baz"
global_asm!(
r#"
.global foo
diff --git a/tests/codegen-llvm/asm/global_asm_include.rs b/tests/codegen-llvm/asm/global_asm_include.rs
index 98be9c3e333..d539ed7b157 100644
--- a/tests/codegen-llvm/asm/global_asm_include.rs
+++ b/tests/codegen-llvm/asm/global_asm_include.rs
@@ -7,9 +7,9 @@
use std::arch::global_asm;
-// CHECK-LABEL: foo
// CHECK: module asm
-// CHECK: module asm "{{[[:space:]]+}}jmp baz"
+// CHECK-LABEL: foo:
+// CHECK: "{{[[:space:]]+}}jmp baz"
global_asm!(include_str!("foo.s"));
extern "C" {
diff --git a/tests/codegen-llvm/asm/global_asm_x2.rs b/tests/codegen-llvm/asm/global_asm_x2.rs
index 9e3a00f0680..7f04b3239df 100644
--- a/tests/codegen-llvm/asm/global_asm_x2.rs
+++ b/tests/codegen-llvm/asm/global_asm_x2.rs
@@ -8,12 +8,12 @@
use core::arch::global_asm;
-// CHECK-LABEL: foo
// CHECK: module asm
-// CHECK: module asm "{{[[:space:]]+}}jmp baz"
+// CHECK-LABEL: foo:
+// CHECK: "{{[[:space:]]+}}jmp baz"
// any other global_asm will be appended to this first block, so:
-// CHECK-LABEL: bar
-// CHECK: module asm "{{[[:space:]]+}}jmp quux"
+// CHECK-LABEL: bar:
+// CHECK: "{{[[:space:]]+}}jmp quux"
global_asm!(
r#"
.global foo
but that looks different enough I'm not even bothering to turn it into a PR for now.
I don't see a way to write these tests so they can pass on both versions of LLVM, so for now I'm filing a bug. This patch would fix the broken tests:
but that looks different enough I'm not even bothering to turn it into a PR for now.