diff --git a/flang/test/Driver/compiler-options.f90 b/flang/test/Driver/compiler-options.f90 index cefa86836abd3..b9ecbbda227d1 100644 --- a/flang/test/Driver/compiler-options.f90 +++ b/flang/test/Driver/compiler-options.f90 @@ -1,11 +1,11 @@ -! RUN: %flang -S -emit-llvm -flang-deprecated-no-hlfir -o - %s | FileCheck %s +! RUN: %flang -S -emit-llvm -o - %s | FileCheck %s ! Test communication of COMPILER_OPTIONS from flang to flang -fc1. -! CHECK: [[OPTSVAR:@_QQclX[0-9a-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}flang{{(\.exe)?}} {{.*}}-S -emit-llvm -flang-deprecated-no-hlfir -o - {{.*}}compiler-options.f90" +! CHECK: [[OPTSVAR:@_QQclX[0-9a-f]+]] = {{[a-z]+}} constant [[[OPTSLEN:[0-9]+]] x i8] c"{{.*}}flang{{(\.exe)?}} {{.*}}-S -emit-llvm -o - {{.*}}compiler-options.f90" program main use ISO_FORTRAN_ENV, only: compiler_options implicit none character (len = :), allocatable :: v -! CHECK: call void @llvm.memmove.p0.p0.i64(ptr %{{[0-9]+}}, ptr [[OPTSVAR]], i64 [[OPTSLEN]], i1 false) +! CHECK: store { ptr, i64, i32, i8, i8, i8, i8 } { ptr [[OPTSVAR]], i64 [[OPTSLEN]], v = compiler_options() print *, v deallocate(v) diff --git a/flang/test/Driver/frontend-forwarding.f90 b/flang/test/Driver/frontend-forwarding.f90 index 952937168c95d..f47d8010bc233 100644 --- a/flang/test/Driver/frontend-forwarding.f90 +++ b/flang/test/Driver/frontend-forwarding.f90 @@ -19,7 +19,6 @@ ! RUN: -fpass-plugin=Bye%pluginext \ ! RUN: -fversion-loops-for-stride \ ! RUN: -flang-experimental-hlfir \ -! RUN: -flang-deprecated-no-hlfir \ ! RUN: -fno-ppc-native-vector-element-order \ ! RUN: -fppc-native-vector-element-order \ ! RUN: -mllvm -print-before-all \ @@ -50,7 +49,6 @@ ! CHECK: "-fpass-plugin=Bye ! CHECK: "-fversion-loops-for-stride" ! CHECK: "-flang-experimental-hlfir" -! CHECK: "-flang-deprecated-no-hlfir" ! CHECK: "-fno-ppc-native-vector-element-order" ! CHECK: "-fppc-native-vector-element-order" ! CHECK: "-Rpass" diff --git a/flang/test/Driver/optimization-remark.f90 b/flang/test/Driver/optimization-remark.f90 index 92b3bd8ba2081..76b794720e593 100644 --- a/flang/test/Driver/optimization-remark.f90 +++ b/flang/test/Driver/optimization-remark.f90 @@ -2,7 +2,7 @@ ! and -Rpass-analysis) ! loop-delete isn't enabled at O0 so we use at least O1 -! DEFINE: %{output} = -emit-llvm -flang-deprecated-no-hlfir -o /dev/null 2>&1 +! DEFINE: %{output} = -emit-llvm -o /dev/null 2>&1 ! Check fc1 can handle -Rpass ! RUN: %flang_fc1 %s -O1 -vectorize-loops -Rpass %{output} 2>&1 | FileCheck %s --check-prefix=REMARKS diff --git a/flang/test/HLFIR/hlfir-flags.f90 b/flang/test/HLFIR/hlfir-flags.f90 index 0b1e80b1e3f63..50f1abf871444 100644 --- a/flang/test/HLFIR/hlfir-flags.f90 +++ b/flang/test/HLFIR/hlfir-flags.f90 @@ -5,18 +5,14 @@ ! RUN: %flang_fc1 -emit-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 --check-prefix FIR --check-prefix ALL %s -! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL ! RUN: %flang_fc1 -emit-fir -flang-experimental-hlfir -o - %s | FileCheck %s --check-prefix FIR --check-prefix ALL ! RUN: bbc -emit-fir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s -! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL -! | Action | -flang-deprecated-no-hlfir | Result | -! | | / -hlfir=false? | | -! | =========== | =========================== | =============================== | -! | -emit-hlfir | N | Outputs HLFIR | -! | -emit-hlfir | Y | Outputs HLFIR | -! | -emit-fir | N | Outputs FIR, lowering via HLFIR | -! | -emit-fir | Y | Outputs FIR, using old lowering | +! | Action | Result | +! | | | +! | =========== | =============================== | +! | -emit-hlfir | Outputs HLFIR | +! | -emit-fir | Outputs FIR, lowering via HLFIR | subroutine test(a, res) real :: a(:), res @@ -27,18 +23,14 @@ subroutine test(a, res) ! ALL: %[[RES:.*]]: !fir.ref ! HLFIR: %[[A_VAR:.*]]:2 = hlfir.declare %[[A]] -! fir.declare is only generated via the hlfir -> fir lowering ! FIR: %[[A_VAR:.*]] = fir.declare %[[A]] -! NO-HLFIR-NOT: fir.declare ! HLFIR-DAG: %[[RES_VAR:.*]]:2 = hlfir.declare %[[RES]] ! FIR: %[[RES_VAR:.*]] = fir.declare %[[RES]] -! NO-HLFIR-NOT: fir.declare ! HLFIR-NEXT: %[[SUM_RES:.*]] = hlfir.sum %[[A_VAR]]#0 ! HLFIR-NEXT: hlfir.assign %[[SUM_RES]] to %[[RES_VAR]]#0 ! FIR-NOT: hlfir. -! NO-HLFIR-NOT: hlfir. ! ALL: return ! ALL-NEXT: } diff --git a/flang/test/Lower/achar.f90 b/flang/test/Lower/achar.f90 index 9b36d165e5133..f5b3168c424ca 100644 --- a/flang/test/Lower/achar.f90 +++ b/flang/test/Lower/achar.f90 @@ -1,4 +1,4 @@ -! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s +! RUN: bbc -emit-fir %s -o - | FileCheck %s ! Tests ACHAR lowering (converting an INTEGER to a CHARACTER (singleton, LEN=1) ! along with conversion of CHARACTER to another KIND. @@ -13,12 +13,15 @@ end subroutine achar_test1 ! CHECK-LABEL: func @_QPachar_test1( ! CHECK-SAME: %[[arg:.*]]: !fir.ref {fir.bindc_name = "a"}) { -! CHECK: %[[VAL_0:.*]] = fir.alloca !fir.char<1> -! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.char<2> {bindc_name = "ch", uniq_name = "_QFachar_test1Ech"} -! CHECK: %[[VAL_2:.*]] = fir.load %[[arg]] : !fir.ref +! CHECK: %[[VAL_TMP_ALLOCA:.*]] = fir.alloca !fir.char<2> {bindc_name = ".tmp"} +! CHECK: %[[VAL_1_ALLOCA:.*]] = fir.alloca !fir.char<1> +! CHECK: %[[VAL_DUMMY_SCOPE:.*]] = fir.dummy_scope : !fir.dscope +! CHECK: %[[VAL_DECLARE:.*]] = fir.declare %[[arg]] dummy_scope %[[VAL_DUMMY_SCOPE]] arg 1 {fortran_attrs = #fir.var_attrs, uniq_name = "_QFachar_test1Ea"} : (!fir.ref, !fir.dscope) -> !fir.ref +! CHECK: %[[VAL_CH_ALLOCA:.*]] = fir.alloca !fir.char<2> {bindc_name = "ch", uniq_name = "_QFachar_test1Ech"} +! CHECK: %[[VAL_2:.*]] = fir.load %[[VAL_DECLARE]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.undefined !fir.char<1> ! CHECK: %[[VAL_6:.*]] = fir.insert_value %[[VAL_5]], %{{.*}}, [0 : index] : (!fir.char<1>, i8) -> !fir.char<1> -! CHECK: fir.store %[[VAL_6]] to %[[VAL_0]] : !fir.ref> +! CHECK: fir.store %[[VAL_6]] to %[[VAL_1_ALLOCA]] : !fir.ref> ! CHECK: %[[VAL_7:.*]] = fir.alloca !fir.char<2,?>(%{{.*}} : index) -! CHECK: fir.char_convert %[[VAL_0]] for %{{.*}} to %[[VAL_7]] : !fir.ref>, index, !fir.ref> +! CHECK: fir.char_convert %[[VAL_1_ALLOCA]] for %{{.*}} to %[[VAL_7]] : !fir.ref>, index, !fir.ref> ! CHECK: fir.call @_QPachar_test1_foo(%{{.*}}) {{.*}}: (!fir.boxchar<2>) -> ()