Debian Codegraph @

flang/test/HLFIR/destroy.fir

raw
1 // Test hlfir.destroy operation parse, verify (no errors), and unparse.
2
3 // RUN: fir-opt %s | fir-opt | FileCheck %s
4
5 func.func @test(%expr : !hlfir.expr<?x?xf64>) {
6 hlfir.destroy %expr : !hlfir.expr<?x?xf64>
7 return
8 }
9 // CHECK-LABEL: func.func @test(
10 // CHECK-SAME: %[[VAL_0:.*]]: !hlfir.expr<?x?xf64>) {
11 // CHECK: hlfir.destroy %[[VAL_0]] : !hlfir.expr<?x?xf64>
12
13 func.func @test_finalize_dt(%expr : !hlfir.expr<?x!fir.type<_QMtypesTt>>) {
14 hlfir.destroy %expr finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>>
15 return
16 }
17 // CHECK-LABEL: func.func @test_finalize_dt(
18 // CHECK-SAME: %[[VAL_0:.*]]: !hlfir.expr<?x!fir.type<_QMtypesTt>>) {
19 // CHECK: hlfir.destroy %[[VAL_0]] finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>>
20
21 func.func @test_finalize_poly(%expr : !hlfir.expr<?x!fir.type<_QMtypesTt>?>) {
22 hlfir.destroy %expr finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>?>
23 return
24 }
25 // CHECK-LABEL: func.func @test_finalize_poly(
26 // CHECK-SAME: %[[VAL_0:.*]]: !hlfir.expr<?x!fir.type<_QMtypesTt>?>) {
27 // CHECK: hlfir.destroy %[[VAL_0]] finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>?>