Unverified Commit f35f863a authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[flang][NFC] Use hlfir=false and flang-deprecated-no-hlfir in legacy tests (#71957)

Patch 2/3 of the transition step 1 described in

https://discourse.llvm.org/t/rfc-enabling-the-hlfir-lowering-by-default/72778/7.

All the modified tests are still here since coverage for the direct
lowering to FIR was still needed while it was default. Some already have
an HLFIR version, some have not and will need to be ported in step 2
described in the RFC.

Note that another 147 lit tests use -emit-fir/-emit-llvm outputs but do
not need a flag since the HLFIR/no HLFIR output is the same for what is
being tested.
parent 4d5a8ccf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s
!RUN: %flang_fc1 -emit-llvm -fopenmp -flang-deprecated-no-hlfir %s -o - | FileCheck %s

!===============================================================================
! Check MapTypes for target implicit captures
+2 −2
Original line number Diff line number Diff line
! RUN: %flang -S -emit-llvm -o - %s | FileCheck %s
! RUN: %flang -S -emit-llvm -flang-deprecated-no-hlfir -o - %s | FileCheck %s
! Test communication of COMPILER_OPTIONS from flang-new to flang-new -fc1.
! CHECK: [[OPTSVAR:@_QQclX[0-9a-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}flang-new{{(\.exe)?}} -S -emit-llvm -o - {{.*}}compiler_options.f90"
! CHECK: [[OPTSVAR:@_QQclX[0-9a-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}flang-new{{(\.exe)?}} -S -emit-llvm -flang-deprecated-no-hlfir -o - {{.*}}compiler_options.f90"
program main
    use ISO_FORTRAN_ENV, only: compiler_options
    implicit none
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
! and -Rpass-analysis)
! loop-delete isn't enabled at O0 so we use at least O1

! DEFINE: %{output} = -emit-llvm -o /dev/null 2>&1
! DEFINE: %{output} = -emit-llvm -flang-deprecated-no-hlfir -o /dev/null 2>&1

! Check fc1 can handle -Rpass
! RUN: %flang_fc1 %s -O1 -Rpass %{output} 2>&1 | FileCheck %s --check-prefix=REMARKS
+1 −1
Original line number Diff line number Diff line
! RUN: bbc -emit-fir %s -o - | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s

! Tests ACHAR lowering (converting an INTEGER to a CHARACTER (singleton, LEN=1)
! along with conversion of CHARACTER to another KIND.
+2 −2
Original line number Diff line number Diff line
! RUN: bbc -polymorphic-type -emit-fir %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
! RUN: bbc -polymorphic-type -emit-fir %s -o - | FileCheck %s --check-prefix=BT
! RUN: bbc -polymorphic-type -emit-fir -hlfir=false %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
! RUN: bbc -polymorphic-type -emit-fir -hlfir=false %s -o - | FileCheck %s --check-prefix=BT

! Tests codegen of fir.dispatch operation. This test is intentionally run from
! Fortran through bbc and tco so we have all the binding tables lowered to FIR
Loading