28 lines · plain
1// Test hlfir.destroy operation parse, verify (no errors), and unparse.2 3// RUN: fir-opt %s | fir-opt | FileCheck %s4 5func.func @test(%expr : !hlfir.expr<?x?xf64>) {6 hlfir.destroy %expr : !hlfir.expr<?x?xf64>7 return8}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 13func.func @test_finalize_dt(%expr : !hlfir.expr<?x!fir.type<_QMtypesTt>>) {14 hlfir.destroy %expr finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>>15 return16}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 21func.func @test_finalize_poly(%expr : !hlfir.expr<?x!fir.type<_QMtypesTt>?>) {22 hlfir.destroy %expr finalize : !hlfir.expr<?x!fir.type<_QMtypesTt>?>23 return24}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>?>28