summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprabhukr <prabhukr@google.com>2024-04-22 11:29:44 -0700
committerprabhukr <prabhukr@google.com>2024-04-22 11:29:44 -0700
commit2ee635ac795c064c1db88e07cdff05aff828c21e (patch)
tree721e434d741e29c29f9114b72c009991321774c3
parent758d97dce0c669a0ba6927728b40030a76acb144 (diff)
Created using spr 1.3.6-beta.1
-rw-r--r--llvm/test/Bitcode/2021-07-22-Metadata-Operand-Bundles.ll12
-rw-r--r--llvm/test/Bitcode/compatibility.ll21
-rw-r--r--llvm/test/Bitcode/operand-bundles.ll20
3 files changed, 53 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/2021-07-22-Metadata-Operand-Bundles.ll b/llvm/test/Bitcode/2021-07-22-Metadata-Operand-Bundles.ll
new file mode 100644
index 000000000000..8080e13af67f
--- /dev/null
+++ b/llvm/test/Bitcode/2021-07-22-Metadata-Operand-Bundles.ll
@@ -0,0 +1,12 @@
+; This test ensures that we get a metadata operand bundle value in and out.
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
+
+declare void @callee()
+
+; CHECK-LABEL: call_with_operand_bundle(
+define void @call_with_operand_bundle() {
+ ; CHECK: call void @op_bundle_callee() [ "op_type"(metadata !"metadata_string") ]
+ call void @callee() [ "op_type"(metadata !"metadata_string") ]
+
+ ret void
+}
diff --git a/llvm/test/Bitcode/compatibility.ll b/llvm/test/Bitcode/compatibility.ll
index b374924516d6..935e7af9a599 100644
--- a/llvm/test/Bitcode/compatibility.ll
+++ b/llvm/test/Bitcode/compatibility.ll
@@ -1819,6 +1819,14 @@ define void @call_with_operand_bundle4(ptr %ptr) {
ret void
}
+define void @call_with_operand_bundle5(ptr %ptr) {
+; CHECK-LABEL: call_with_operand_bundle5(
+ entry:
+ call void @op_bundle_callee_0() [ "foo"(metadata !"metadata_string") ]
+; CHECK: call void @op_bundle_callee_0() [ "foo"(metadata !"metadata_string") ]
+ ret void
+}
+
; Invoke versions of the above tests:
@@ -1914,6 +1922,19 @@ normal:
ret void
}
+define void @invoke_with_operand_bundle5(ptr %ptr) personality i8 3 {
+; CHECK-LABEL: @invoke_with_operand_bundle5(
+ entry:
+ invoke void @op_bundle_callee_0() [ "foo"(metadata !"metadata_string") ] to label %normal unwind label %exception
+; CHECK: invoke void @op_bundle_callee_0() [ "foo"(metadata !"metadata_string") ]
+
+exception:
+ %cleanup = landingpad i8 cleanup
+ br label %normal
+normal:
+ ret void
+}
+
declare void @vaargs_func(...)
define void @invoke_with_operand_bundle_vaarg(ptr %ptr) personality i8 3 {
; CHECK-LABEL: @invoke_with_operand_bundle_vaarg(
diff --git a/llvm/test/Bitcode/operand-bundles.ll b/llvm/test/Bitcode/operand-bundles.ll
index ab28cffd84aa..99591672656e 100644
--- a/llvm/test/Bitcode/operand-bundles.ll
+++ b/llvm/test/Bitcode/operand-bundles.ll
@@ -58,6 +58,13 @@ define void @f4(i32* %ptr) {
; Invoke versions of the above tests:
+define void @f5(i32* %ptr) {
+; CHECK-LABEL: @f5(
+ entry:
+ call void @callee0() [ "foo"(metadata !"metadata_string") ]
+; CHECK: call void @callee0() [ "foo"(metadata !"metadata_string") ]
+ ret void
+}
define void @g0(i32* %ptr) personality i8 3 {
; CHECK-LABEL: @g0(
@@ -150,3 +157,16 @@ exception:
normal:
ret void
}
+
+define void @g5(i32* %ptr) personality i8 3 {
+; CHECK-LABEL: @g5(
+ entry:
+ invoke void @callee0() [ "foo"(metadata !"metadata_string") ] to label %normal unwind label %exception
+; CHECK: invoke void @callee0() [ "foo"(metadata !"metadata_string") ]
+
+exception:
+ %cleanup = landingpad i8 cleanup
+ br label %normal
+normal:
+ ret void
+} \ No newline at end of file