Skip to content

Commit bb1e6ae

Browse files
* Fix test, add "qir-api" to attributes
Signed-off-by: Pradnya Khalate <[email protected]>
1 parent da44d72 commit bb1e6ae

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/AST-Quake/cudaq_run.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct CliffHanger {
4949
};
5050

5151
// clang-format off
52-
// CHECK-LABEL: func.func @__nvqpp__mlirgen__K9() attributes {"cudaq-entrypoint", "cudaq-kernel"} {
52+
// CHECK-LABEL: func.func @__nvqpp__mlirgen__K9() attributes {"cudaq-entrypoint", "cudaq-kernel", "qir-api"} {
5353
// CHECK-DAG: %[[VAL_0:.*]] = arith.constant 4 : i64
5454
// CHECK-DAG: %[[VAL_1:.*]] = arith.constant 3 : i64
5555
// CHECK-DAG: %[[VAL_2:.*]] = arith.constant 2 : i64
@@ -138,7 +138,7 @@ struct CliffHanger {
138138
// CHECK: }
139139

140140
// CHECK-LABEL: func.func @__nvqpp__mlirgen__function_kernel_of_truth.
141-
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this} {
141+
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this, "qir-api"} {
142142
// CHECK: %[[VAL_0:.*]] = arith.constant true
143143
// CHECK: %[[VAL_1:.*]] = cc.string_literal "i1" : !cc.ptr<!cc.array<i8 x 3>>
144144
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 3>>) -> !cc.ptr<i8>
@@ -147,15 +147,15 @@ struct CliffHanger {
147147
// CHECK: }
148148

149149
// CHECK-LABEL: func.func @__nvqpp__mlirgen__function_kernel_of_corn.
150-
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this} {
150+
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this, "qir-api"} {
151151
// CHECK: %[[VAL_0:.*]] = arith.constant -559038737 : i64
152152
// CHECK: %[[VAL_1:.*]] = cc.string_literal "i32" : !cc.ptr<!cc.array<i8 x 4>>
153153
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 4>>) -> !cc.ptr<i8>
154154
// CHECK: call @__quantum__rt__integer_record_output(%[[VAL_0]], %[[VAL_2]]) : (i64, !cc.ptr<i8>) -> ()
155155
// CHECK: return
156156
// CHECK: }
157157

158-
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffDiver() attributes {"cudaq-entrypoint", "cudaq-kernel"} {
158+
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffDiver() attributes {"cudaq-entrypoint", "cudaq-kernel", "qir-api"} {
159159
// CHECK: %[[VAL_0:.*]] = arith.constant 4.200000e+01 : f64
160160
// CHECK: %[[VAL_1:.*]] = cc.string_literal "f64" : !cc.ptr<!cc.array<i8 x 4>>
161161
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 4>>) -> !cc.ptr<i8>
@@ -164,15 +164,15 @@ struct CliffHanger {
164164
// CHECK: }
165165

166166
// CHECK-LABEL: func.func @__nvqpp__mlirgen__function_kernel_of_wheat.
167-
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this} {
167+
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this, "qir-api"} {
168168
// CHECK: %[[VAL_0:.*]] = arith.constant 13.100000381469727 : f64
169169
// CHECK: %[[VAL_1:.*]] = cc.string_literal "f32" : !cc.ptr<!cc.array<i8 x 4>>
170170
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 4>>) -> !cc.ptr<i8>
171171
// CHECK: call @__quantum__rt__double_record_output(%[[VAL_0]], %[[VAL_2]]) : (f64, !cc.ptr<i8>) -> ()
172172
// CHECK: return
173173
// CHECK: }
174174

175-
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffClimber() attributes {"cudaq-entrypoint", "cudaq-kernel"} {
175+
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffClimber() attributes {"cudaq-entrypoint", "cudaq-kernel", "qir-api"} {
176176
// CHECK: %[[VAL_0:.*]] = arith.constant 99 : i64
177177
// CHECK: %[[VAL_1:.*]] = cc.string_literal "i8" : !cc.ptr<!cc.array<i8 x 3>>
178178
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 3>>) -> !cc.ptr<i8>
@@ -181,7 +181,7 @@ struct CliffHanger {
181181
// CHECK: }
182182

183183
// CHECK-LABEL: func.func @__nvqpp__mlirgen__function_this_is_not_a_drill.
184-
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this} {
184+
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this, "qir-api"} {
185185
// CHECK: %[[VAL_0:.*]] = arith.constant 123400000 : i64
186186
// CHECK: %[[VAL_1:.*]] = cc.string_literal "i64" : !cc.ptr<!cc.array<i8 x 4>>
187187
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 4>>) -> !cc.ptr<i8>
@@ -190,15 +190,15 @@ struct CliffHanger {
190190
// CHECK: }
191191

192192
// CHECK-LABEL: func.func @__nvqpp__mlirgen__function_this_is_a_hammer.
193-
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this} {
193+
// CHECK-SAME: () attributes {"cudaq-entrypoint", "cudaq-kernel", no_this, "qir-api"} {
194194
// CHECK: %[[VAL_0:.*]] = arith.constant 2387 : i64
195195
// CHECK: %[[VAL_1:.*]] = cc.string_literal "i16" : !cc.ptr<!cc.array<i8 x 4>>
196196
// CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (!cc.ptr<!cc.array<i8 x 4>>) -> !cc.ptr<i8>
197197
// CHECK: call @__quantum__rt__integer_record_output(%[[VAL_0]], %[[VAL_2]]) : (i64, !cc.ptr<i8>) -> ()
198198
// CHECK: return
199199
// CHECK: }
200200

201-
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffHanger() attributes {"cudaq-entrypoint", "cudaq-kernel"} {
201+
// CHECK-LABEL: func.func @__nvqpp__mlirgen__CliffHanger() attributes {"cudaq-entrypoint", "cudaq-kernel", "qir-api"} {
202202
// CHECK-DAG: %[[VAL_0:.*]] = arith.constant 2 : i64
203203
// CHECK-DAG: %[[VAL_1:.*]] = arith.constant true
204204
// CHECK-DAG: %[[VAL_2:.*]] = arith.constant 747 : i32

0 commit comments

Comments
 (0)