[llvm] e114979 - Add a baseline test for llvm.annotation IR upgrade
Alex Richardson via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 10:29:29 PST 2022
Author: Alex Richardson
Date: 2022-12-07T18:29:18Z
New Revision: e114979dce339c43e8bcf2c13f6f17dbc310b269
URL: https://github.com/llvm/llvm-project/commit/e114979dce339c43e8bcf2c13f6f17dbc310b269
DIFF: https://github.com/llvm/llvm-project/commit/e114979dce339c43e8bcf2c13f6f17dbc310b269.diff
LOG: Add a baseline test for llvm.annotation IR upgrade
This will be overloaded in the next commit.
Added:
llvm/test/Bitcode/upgrade-annotation.ll
llvm/test/Bitcode/upgrade-annotation.ll.bc
Modified:
llvm/test/Bitcode/upgrade-ptr-annotation.ll
llvm/test/Bitcode/upgrade-var-annotation.ll
Removed:
################################################################################
diff --git a/llvm/test/Bitcode/upgrade-annotation.ll b/llvm/test/Bitcode/upgrade-annotation.ll
new file mode 100644
index 0000000000000..155576dbd2d81
--- /dev/null
+++ b/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)
diff --git a/llvm/test/Bitcode/upgrade-annotation.ll.bc b/llvm/test/Bitcode/upgrade-annotation.ll.bc
new file mode 100644
index 0000000000000..5828e6e96656e
Binary files /dev/null and b/llvm/test/Bitcode/upgrade-annotation.ll.bc
diff er
diff --git a/llvm/test/Bitcode/upgrade-ptr-annotation.ll b/llvm/test/Bitcode/upgrade-ptr-annotation.ll
index aeacc6f1a6cea..a941866177b54 100644
--- a/llvm/test/Bitcode/upgrade-ptr-annotation.ll
+++ b/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
diff --git a/llvm/test/Bitcode/upgrade-var-annotation.ll b/llvm/test/Bitcode/upgrade-var-annotation.ll
index 30f692cd8db84..0b46814dc3253 100644
--- a/llvm/test/Bitcode/upgrade-var-annotation.ll
+++ b/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
More information about the llvm-commits
mailing list