mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 04:00:56 +00:00
fce529fc6e
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D113171
50 lines
1.1 KiB
MLIR
50 lines
1.1 KiB
MLIR
// RUN: mlir-opt %s -test-func-insert-arg -split-input-file | FileCheck %s
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A})
|
|
func @f() attributes {test.insert_args = [
|
|
[0, i1, {test.A}]]} {
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A}, %arg1: i2 {test.B})
|
|
func @f(%arg0: i2 {test.B}) attributes {test.insert_args = [
|
|
[0, i1, {test.A}]]} {
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A}, %arg1: i2 {test.B})
|
|
func @f(%arg0: i1 {test.A}) attributes {test.insert_args = [
|
|
[1, i2, {test.B}]]} {
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A}, %arg1: i2 {test.B}, %arg2: i3 {test.C})
|
|
func @f(%arg0: i1 {test.A}, %arg1: i3 {test.C}) attributes {test.insert_args = [
|
|
[1, i2, {test.B}]]} {
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A}, %arg1: i2 {test.B}, %arg2: i3 {test.C})
|
|
func @f(%arg0: i2 {test.B}) attributes {test.insert_args = [
|
|
[0, i1, {test.A}],
|
|
[1, i3, {test.C}]]} {
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: func @f(%arg0: i1 {test.A}, %arg1: i2 {test.B}, %arg2: i3 {test.C})
|
|
func @f(%arg0: i3 {test.C}) attributes {test.insert_args = [
|
|
[0, i1, {test.A}],
|
|
[0, i2, {test.B}]]} {
|
|
return
|
|
}
|