Skip to content

Commit

Permalink
[flang][hlfir] Separate -emit-fir and -emit-hlfir for bbc
Browse files Browse the repository at this point in the history
In review for https://reviews.llvm.org/D146278, @vzakhari asked to
separate -emit-fir and -emit-hlfir. This will allow FIR to be easily
outputted after the HLFIR passes have been run.

The new semantics are as follows:

| Action      | -hlfir? | Result                          |
| =========== | ======= | =============================== |
| -emit-hlfir | N       | Outputs HLFIR                   |
| -emit-hlfir | Y       | Outputs HLFIR                   |
| -emit-fir   | N       | Outputs FIR, using old lowering |
| -emit-fir   | Y       | Outputs FIR, lowering via HLFIR |

This is tested in flang/test/HLFIR/hlfir-flags.f90

Depends on: D151088

Differential Revision: https://reviews.llvm.org/D151108
  • Loading branch information
tblah committed Jun 1, 2023
1 parent 39ecf9d commit 81ea6b7
Show file tree
Hide file tree
Showing 70 changed files with 101 additions and 82 deletions.
2 changes: 1 addition & 1 deletion flang/test/HLFIR/boxchar_emboxing.f90
@@ -1,4 +1,4 @@
! RUN: bbc -polymorphic-type -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | FileCheck %s

! CHECK-LABEL: func.func @_QPtest1(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.class<none> {fir.bindc_name = "x"}) {
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/c_ptr_byvalue.f90
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

! CHECK-LABEL: func.func @_QPtest1() {
! CHECK: %[[VAL_110:.*]]:3 = hlfir.associate %{{.*}} {uniq_name = "adapt.cptrbyval"} : (!hlfir.expr<!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>>) -> (!fir.ref<!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>>, !fir.ref<!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>>, i1)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/call_with_poly_dummy.f90
@@ -1,4 +1,4 @@
! RUN: bbc -polymorphic-type -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -polymorphic-type -emit-hlfir %s -o - | FileCheck %s

! Test passing arguments to subprograms with polymorphic dummy arguments.

Expand Down
4 changes: 2 additions & 2 deletions flang/test/HLFIR/extents-of-shape-of.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-HLFIR %s
! RUN: bbc -emit-fir -hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | fir-opt --convert-hlfir-to-fir | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-FIR %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-HLFIR %s
! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | fir-opt --convert-hlfir-to-fir | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-FIR %s
subroutine foo(a, b)
real :: a(2, 2), b(:, :)
interface
Expand Down
@@ -1,15 +1,19 @@
! Test -flang-experimental-hlfir, -emit-hlfir, -emit-fir flags
! Test -flang-experimental-hlfir (flang-new), -hlfir (bbc), -emit-hlfir, -emit-fir flags
! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s
! RUN: %flang_fc1 -emit-hlfir -flang-experimental-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s
! RUN: bbc -emit-hlfir -hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s
! RUN: %flang_fc1 -emit-fir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL
! RUN: bbc -emit-fir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL
! RUN: %flang_fc1 -emit-fir -flang-experimental-hlfir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s

! | Action | -flang-experimental-hlfir? | Result |
! | =========== | ========================== | =============================== |
! | -emit-hlfir | N | Outputs HLFIR |
! | -emit-hlfir | Y | Outputs HLFIR |
! | -emit-fir | N | Outputs FIR, using old lowering |
! | -emit-fir | Y | Outputs FIR, lowering via HLFIR |
! | Action | -flang-experimental-hlfir / -hlfir? | Result |
! | =========== | =================================== | =============================== |
! | -emit-hlfir | N | Outputs HLFIR |
! | -emit-hlfir | Y | Outputs HLFIR |
! | -emit-fir | N | Outputs FIR, using old lowering |
! | -emit-fir | Y | Outputs FIR, lowering via HLFIR |

subroutine test(a, res)
real :: a(:), res
Expand Down
10 changes: 5 additions & 5 deletions flang/test/HLFIR/mul_transpose.f90
@@ -1,8 +1,8 @@
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck --check-prefix CHECK-BASE --check-prefix CHECK-ALL %s
! RUN: bbc -emit-fir -hlfir %s -o - | fir-opt --canonicalize | FileCheck --check-prefix CHECK-CANONICAL --check-prefix CHECK-ALL %s
! RUN: bbc -emit-fir -hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING --check-prefix CHECK-ALL %s
! RUN: bbc -emit-fir -hlfir %s -o - | fir-opt --canonicalize | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING-OPT --check-prefix CHECK-ALL %s
! RUN: bbc -emit-fir -hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | FileCheck --check-prefix CHECK-BUFFERING --check-prefix CHECK-ALL %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck --check-prefix CHECK-BASE --check-prefix CHECK-ALL %s
! RUN: bbc -emit-hlfir %s -o - | fir-opt --canonicalize | FileCheck --check-prefix CHECK-CANONICAL --check-prefix CHECK-ALL %s
! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING --check-prefix CHECK-ALL %s
! RUN: bbc -emit-hlfir %s -o - | fir-opt --canonicalize | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING-OPT --check-prefix CHECK-ALL %s
! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | FileCheck --check-prefix CHECK-BUFFERING --check-prefix CHECK-ALL %s

! Test passing a hlfir.expr from one intrinsic to another
subroutine mul_transpose(a, b, res)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/optional_dummy.f90
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

! Check that the lowering does not generate fir.box_addr for
! the optional box. It will cause segfault during execution.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/all.f90
@@ -1,5 +1,5 @@
! Test lowering of ALL intrinsic to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! simple 1 argument ALL
subroutine all1(a, s)
Expand Down
@@ -1,5 +1,5 @@
! Test lowering of whole allocatable and pointer components to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s -I nw | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nw | FileCheck %s

module def_test_types
type t1
Expand Down
@@ -1,6 +1,6 @@
! Test lowering of allocate, deallocate and pointer assignment statements to
! HLFIR.
! RUN: bbc -emit-fir -hlfir -o - %s -I nw | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nw | FileCheck %s

subroutine allocation(x)
character(*), allocatable :: x(:)
Expand Down
Expand Up @@ -3,7 +3,7 @@
! be inserted and addressed in a following hlfir.designate to address
! the sub-part.

! RUN: bbc -emit-fir -hlfir -o - %s -I nw | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s -I nw | FileCheck %s

module m
type t1
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/allocatables-and-pointers.f90
@@ -1,5 +1,5 @@
! Test lowering of whole allocatable and pointers to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine passing_allocatable(x)
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/any.f90
@@ -1,5 +1,5 @@
! Test lowering of ANY intrinsic to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s
! simple 1 argument ANY
subroutine any1(a, s)
logical :: a(:), s
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-as-elemental-nested.f90
@@ -1,5 +1,5 @@
! Test lowering of nested array constructors as hlfir.elemental.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

! hlfir.end_associate and hlfir.destroy used to be generated
! after hlfir.yield_element for the outermost hlfir.elemental.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-as-elemental.f90
@@ -1,5 +1,5 @@
! Test lowering of array constructors as hlfir.elemental.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test_as_simple_elemental(n)
integer :: n
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-as-inlined-temp.f90
@@ -1,5 +1,5 @@
! Test lowering of array constructors as inlined temporary.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test_simple(i)
call takes_int([42, i])
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-as-runtime-temp.f90
@@ -1,5 +1,5 @@
! Test lowering of array constructors requiring runtime library help to HLFIR.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
module arrayctor
contains

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-character.f90
@@ -1,5 +1,5 @@
! Test lowering of character array constructors to HLFIR.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

module chararrayctor
character(3), target :: ctarg1 = "abc"
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-derived.f90
@@ -1,5 +1,5 @@
! Test lowering of derived type array constructors to HLFIR.
! RUN: bbc -emit-fir -hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s

module types
type simple
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/array-ctor-index.f90
@@ -1,5 +1,5 @@
! Check that the implied-do index value is converted to proper type.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

function test1(k)
integer*1 :: k
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/assignment-intrinsics.f90
@@ -1,5 +1,5 @@
! Test lowering of intrinsic assignments to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! -----------------------------------------------------------------------------
! Test assignments with scalar variable LHS and RHS
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/associate-construct.f90
@@ -1,5 +1,5 @@
! Test lowering of associate construct to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine associate_expr(x)
integer :: x(:)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/binary-ops.f90
@@ -1,5 +1,5 @@
! Test lowering of binary intrinsic operations to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine int_add(x, y, z)
integer :: x, y, z
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/c_ptr-constant-init.f90
@@ -1,5 +1,5 @@
! Test creation of outlined literal array with c_ptr/c_funptr elements.
! RUN: bbc -hlfir -emit-fir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test
use, intrinsic :: iso_c_binding
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-assumed-shape.f90
@@ -1,6 +1,6 @@
! Test lowering of calls involving assumed shape arrays or arrays with
! VALUE attribute.
! RUN: bbc -emit-fir -hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s

subroutine test_assumed_to_assumed(x)
interface
Expand Down
Expand Up @@ -2,7 +2,7 @@
! This is a special case because characters are always returned
! or handled in memory otherwise.

! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine scalar_char(c, i)
character(1) :: c
Expand Down
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir --polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir --polymorphic-type -o - %s | FileCheck %s

! Test when constant argument are copied in memory
! and passed to polymorphic arguments.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-constant-expr-arg.f90
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

! Test that the constant array expression actual argument
! is placed into a temporary inside 'test' subroutine before
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-f77.f90
@@ -1,5 +1,5 @@
! Test lowering of F77 calls to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! -----------------------------------------------------------------------------
! Test lowering of F77 procedure reference arguments
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/calls-optional.f90
Expand Up @@ -2,7 +2,7 @@
! that is syntactically present, but may be absent at runtime (is
! an optional or a pointer/allocatable).
!
! RUN: bbc -emit-fir -hlfir -polymorphic-type -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -polymorphic-type -o - %s | FileCheck %s

subroutine optional_copy_in_out(x)
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/concat.f90
@@ -1,5 +1,5 @@
! Test lowering of character concatenation to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine concat(c1, c2, c3)
character(*) :: c1, c2, c3
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/constant-derived.f90
@@ -1,5 +1,5 @@
! Test lowering of Constant<SomeDerived>.
! RUN: bbc -hlfir -emit-fir -o - -I nowhere %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - -I nowhere %s 2>&1 | FileCheck %s

subroutine test_constant_scalar()
type myderived
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/constant.f90
@@ -1,5 +1,5 @@
! Test lowering of Constant<T>.
! RUN: bbc -hlfir -emit-fir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! CHECK-LABEL: func.func @_QPtest_constant_scalar()
subroutine test_constant_scalar()
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/conversion-ops.f90
@@ -1,5 +1,5 @@
! Test lowering of intrinsic conversions to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine test
integer(4) :: i4
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/convert-variable.f90
@@ -1,5 +1,5 @@
! Test lowering of variables to fir.declare
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

subroutine scalar_numeric(x)
integer :: x
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/descriptor-inquiries.f90
@@ -1,7 +1,7 @@
! Test lowering of extent and lower bound inquires that
! come in lowering as evaluate::DescriptorInquiry.

! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test_assumed_shape(x, r)
integer(8) :: r
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/designators-component-ref.f90
@@ -1,5 +1,5 @@
! Test lowering of component reference to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
module comp_ref
type t1
integer :: scalar_i
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/designators.f90
@@ -1,5 +1,5 @@
! Test lowering of designators to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine array_ref(x, n)
real :: x(:)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/dummy-argument-optional.f90
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

! Test OPTIONAL lowering on caller/callee
module opt
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/elemental-array-ops.f90
@@ -1,5 +1,5 @@
! Test lowering of elemental intrinsic operations with array arguments to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine binary(x, y)
integer :: x(100), y(100)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/elemental-intrinsics.f90
Expand Up @@ -2,7 +2,7 @@
! The goal here is not to test every intrinsics, it is to test the
! lowering framework for elemental intrinsics. This test various
! intrinsics that have different number or arguments and argument types.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine simple_elemental(x,y)
real :: x(100), y(100)
Expand Down
@@ -1,6 +1,6 @@
! Test lowering of user defined elemental procedure reference to HLFIR
! With polymorphic arguments.
! RUN: bbc -emit-fir -hlfir -I nw -polymorphic-type -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -I nw -polymorphic-type -o - %s 2>&1 | FileCheck %s
module def_some_types
type :: t
integer :: i
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/elemental-user-procedure-ref.f90
@@ -1,5 +1,5 @@
! Test lowering of user defined elemental procedure reference to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

subroutine by_addr(x, y)
integer :: x
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/expr-addr.f90
@@ -1,5 +1,5 @@
! Test lowering of of expressions as address
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! CHECK-LABEL: func.func @_QPfoo(
! CHECK-SAME: %[[arg0:.*]]: !fir.ref<i32>
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/expr-as-inquired.f90
@@ -1,7 +1,7 @@
! Test lowering to HLFIR of the intrinsic lowering framework
! "asInquired" option.

! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s

subroutine test_isAllocated(x, l)
logical :: l
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/expr-value.f90
@@ -1,5 +1,5 @@
! Test lowering of of expressions as values
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

! CHECK-LABEL: func.func @_QPfoo()
subroutine foo()
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/function-return.f90
@@ -1,5 +1,5 @@
! Test lowering of function return to HLFIR
! RUN: bbc -emit-fir -hlfir -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s

integer function simple_return()
simple_return = 42
Expand Down
@@ -1,6 +1,6 @@
! Test passing mismatching rank arguments to unlimited polymorphic
! dummy with IGNORE_TKR(R).
! RUN: bbc -hlfir -emit-fir -polymorphic-type -o - -I nowhere %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -polymorphic-type -o - -I nowhere %s 2>&1 | FileCheck %s

module m
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/implicit-call-mismatch.f90
Expand Up @@ -2,7 +2,7 @@
! Lowering must close the eyes and do as if it did not know
! about the function definition since semantic lets these
! programs through with a warning.
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

subroutine takes_char(c)
character(8) :: c
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/implicit-type-conversion.f90
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s

! CHECK-LABEL: func.func @_QPtest1(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<i32> {fir.bindc_name = "x"},
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/HLFIR/internal-procedures.f90
@@ -1,6 +1,6 @@
! Test captured variables instantiation inside internal procedures
! when lowering to HLFIR.
! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
subroutine test_explicit_shape_array(x, n)
integer(8) :: n
real :: x(n)
Expand Down

0 comments on commit 81ea6b7

Please sign in to comment.