aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler/metadata-function-local.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Assembler/metadata-function-local.ll')
-rw-r--r--test/Assembler/metadata-function-local.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Assembler/metadata-function-local.ll b/test/Assembler/metadata-function-local.ll
new file mode 100644
index 0000000..9768e34
--- /dev/null
+++ b/test/Assembler/metadata-function-local.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
+; RUN: verify-uselistorder %s
+
+declare void @llvm.metadata(metadata)
+
+define void @foo(i32 %arg) {
+entry:
+ %before = alloca i32
+ call void @llvm.metadata(metadata i32 %arg)
+ call void @llvm.metadata(metadata i32* %after)
+ call void @llvm.metadata(metadata i32* %before)
+ %after = alloca i32
+ ret void
+
+; CHECK: %before = alloca i32
+; CHECK: call void @llvm.metadata(metadata i32 %arg)
+; CHECK: call void @llvm.metadata(metadata i32* %after)
+; CHECK: call void @llvm.metadata(metadata i32* %before)
+; CHECK: %after = alloca i32
+}