Skip to content

Commit

Permalink
Add a baseline test for llvm.annotation IR upgrade
Browse files Browse the repository at this point in the history
This will be overloaded in the next commit.
  • Loading branch information
arichardson committed Dec 7, 2022
1 parent 53445f5 commit e114979
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions llvm/test/Bitcode/upgrade-annotation.ll
@@ -0,0 +1,15 @@
; Test upgrade of llvm.annotation intrinsics.
;
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: llvm-dis < %s.bc | FileCheck %s


; CHECK: define i32 @f(i32 [[ARG0:%.*]], i8* [[ARG1:%.*]], i8* [[ARG2:%.*]], i32 [[ARG3:%.*]])
define i32 @f(i32 %arg0, i8* %arg1, i8* %arg2, i32 %arg3) {
%result = call i32 @llvm.annotation.i32(i32 %arg0, i8* %arg1, i8* %arg2, i32 %arg3)
; CHECK: [[RESULT:%.*]] = call i32 @llvm.annotation.i32(i32 [[ARG0]], i8* [[ARG1]], i8* [[ARG2]], i32 [[ARG3]])
ret i32 %result
}

declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32)
; CHECK: declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32)
Binary file added llvm/test/Bitcode/upgrade-annotation.ll.bc
Binary file not shown.
1 change: 1 addition & 0 deletions llvm/test/Bitcode/upgrade-ptr-annotation.ll
@@ -1,5 +1,6 @@
; Test upgrade of ptr.annotation intrinsics.
;
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: llvm-dis < %s.bc | FileCheck %s

; Unused return values
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Bitcode/upgrade-var-annotation.ll
@@ -1,5 +1,6 @@
; Test upgrade of var.annotation intrinsics.
;
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: llvm-dis < %s.bc | FileCheck %s


Expand Down

0 comments on commit e114979

Please sign in to comment.