xref: /llvm-project/flang/test/Fir/target-rewrite-selective-no-struct.fir (revision 36a073a5f45e0da3b84bd5284219d64586a97d5d)
1// Test no-struct-conversion of target-rewrite pass.
2// RUN: fir-opt -target-rewrite="no-struct-conversion" %s | FileCheck %s
3
4func.func @test(%arg0: !fir.type<t{i:i32}>) {
5  return
6}
7
8func.func @test_call(%arg0: !fir.type<t{i:i32}>) {
9  fir.call @test(%arg0) : (!fir.type<t{i:i32}>) -> ()
10  return
11}
12
13func.func @test_addr_off() {
14  %0 = fir.address_of(@test) : (!fir.type<t{i:i32}>) -> ()
15  return
16}
17
18// CHECK-LABEL:  func.func @test(%{{.*}}: !fir.type<t{i:i32}>) {
19
20// CHECK-LABEL:  func.func @test_call(
21// CHECK-SAME:                        %[[ARG0:.*]]: !fir.type<t{i:i32}>) {
22// CHECK:    fir.call @test(%[[ARG0]]) : (!fir.type<t{i:i32}>) -> ()
23
24// CHECK-LABEL:  func.func @test_addr_off() {
25// CHECK:    fir.address_of(@test) : (!fir.type<t{i:i32}>) -> ()
26