Skip to content

Commit e114979

Browse files
committed
Add a baseline test for llvm.annotation IR upgrade
This will be overloaded in the next commit.
1 parent 53445f5 commit e114979

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; Test upgrade of llvm.annotation intrinsics.
2+
;
3+
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
4+
; RUN: llvm-dis < %s.bc | FileCheck %s
5+
6+
7+
; CHECK: define i32 @f(i32 [[ARG0:%.*]], i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i32 [[ARG3:%.*]])
8+
define i32 @f(i32 %arg0, i8* %arg1, i8* %arg2, i32 %arg3) {
9+
%result = call i32 @llvm.annotation.i32(i32 %arg0, i8* %arg1, i8* %arg2, i32 %arg3)
10+
; CHECK: [[RESULT:%.*]] = call i32 @llvm.annotation.i32(i32 [[ARG0]], i8* [[ARG1]], i8* [[ARG2]], i32 [[ARG3]])
11+
ret i32 %result
12+
}
13+
14+
declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32)
15+
; CHECK: declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32)
1.36 KB
Binary file not shown.

llvm/test/Bitcode/upgrade-ptr-annotation.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; Test upgrade of ptr.annotation intrinsics.
22
;
3+
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
34
; RUN: llvm-dis < %s.bc | FileCheck %s
45

56
; Unused return values

llvm/test/Bitcode/upgrade-var-annotation.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; Test upgrade of var.annotation intrinsics.
22
;
3+
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
34
; RUN: llvm-dis < %s.bc | FileCheck %s
45

56

0 commit comments

Comments
 (0)