[flang][OpenMP] Create unique reduction decls for different logical kinds (#146558)
Some Fujitsu tests showed incorrect results because we were sharing reduction declarations for different kinds for logical variables.
This commit is contained in:
@@ -149,13 +149,17 @@ std::string ReductionProcessor::getReductionName(
|
|||||||
reductionName = "multiply_reduction";
|
reductionName = "multiply_reduction";
|
||||||
break;
|
break;
|
||||||
case omp::clause::DefinedOperator::IntrinsicOperator::AND:
|
case omp::clause::DefinedOperator::IntrinsicOperator::AND:
|
||||||
return "and_reduction";
|
reductionName = "and_reduction";
|
||||||
|
break;
|
||||||
case omp::clause::DefinedOperator::IntrinsicOperator::EQV:
|
case omp::clause::DefinedOperator::IntrinsicOperator::EQV:
|
||||||
return "eqv_reduction";
|
reductionName = "eqv_reduction";
|
||||||
|
break;
|
||||||
case omp::clause::DefinedOperator::IntrinsicOperator::OR:
|
case omp::clause::DefinedOperator::IntrinsicOperator::OR:
|
||||||
return "or_reduction";
|
reductionName = "or_reduction";
|
||||||
|
break;
|
||||||
case omp::clause::DefinedOperator::IntrinsicOperator::NEQV:
|
case omp::clause::DefinedOperator::IntrinsicOperator::NEQV:
|
||||||
return "neqv_reduction";
|
reductionName = "neqv_reduction";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reductionName = "other_reduction";
|
reductionName = "other_reduction";
|
||||||
break;
|
break;
|
||||||
@@ -673,9 +677,6 @@ void ReductionProcessor::processReductionArguments(
|
|||||||
const auto &kindMap = firOpBuilder.getKindMap();
|
const auto &kindMap = firOpBuilder.getKindMap();
|
||||||
std::string reductionName;
|
std::string reductionName;
|
||||||
ReductionIdentifier redId;
|
ReductionIdentifier redId;
|
||||||
mlir::Type redNameTy = redType;
|
|
||||||
if (mlir::isa<fir::LogicalType>(redType.getEleTy()))
|
|
||||||
redNameTy = builder.getI1Type();
|
|
||||||
|
|
||||||
if (const auto &redDefinedOp =
|
if (const auto &redDefinedOp =
|
||||||
std::get_if<omp::clause::DefinedOperator>(&redOperator.u)) {
|
std::get_if<omp::clause::DefinedOperator>(&redOperator.u)) {
|
||||||
@@ -697,8 +698,7 @@ void ReductionProcessor::processReductionArguments(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
reductionName =
|
reductionName = getReductionName(intrinsicOp, kindMap, redType, isByRef);
|
||||||
getReductionName(intrinsicOp, kindMap, redNameTy, isByRef);
|
|
||||||
} else if (const auto *reductionIntrinsic =
|
} else if (const auto *reductionIntrinsic =
|
||||||
std::get_if<omp::clause::ProcedureDesignator>(
|
std::get_if<omp::clause::ProcedureDesignator>(
|
||||||
&redOperator.u)) {
|
&redOperator.u)) {
|
||||||
@@ -709,7 +709,7 @@ void ReductionProcessor::processReductionArguments(
|
|||||||
redId = getReductionType(*reductionIntrinsic);
|
redId = getReductionType(*reductionIntrinsic);
|
||||||
reductionName =
|
reductionName =
|
||||||
getReductionName(getRealName(*reductionIntrinsic).ToString(), kindMap,
|
getReductionName(getRealName(*reductionIntrinsic).ToString(), kindMap,
|
||||||
redNameTy, isByRef);
|
redType, isByRef);
|
||||||
} else {
|
} else {
|
||||||
TODO(currentLocation, "Unexpected reduction type");
|
TODO(currentLocation, "Unexpected reduction type");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @and_reduction : !fir.ref<!fir.logical<4>>
|
! CHECK-LABEL: omp.declare_reduction @and_reduction_byref_l32 : !fir.ref<!fir.logical<4>>
|
||||||
! CHECK-SAME: alloc {
|
! CHECK-SAME: alloc {
|
||||||
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
||||||
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @and_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @and_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -90,7 +90,7 @@ end subroutine simple_reduction
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @and_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @and_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -147,7 +147,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @and_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @and_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @and_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @and_reduction_byref_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @and_reduction_byref_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @and_reduction_byref_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @and_reduction : !fir.logical<4> init {
|
! CHECK-LABEL: omp.declare_reduction @and_reduction_l32 : !fir.logical<4> init {
|
||||||
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
||||||
! CHECK: %[[VAL_1:.*]] = arith.constant true
|
! CHECK: %[[VAL_1:.*]] = arith.constant true
|
||||||
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@and_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@and_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -82,7 +82,7 @@ end subroutine simple_reduction
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@and_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@and_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -139,7 +139,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@and_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], @and_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], @and_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@and_reduction_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], @and_reduction_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], @and_reduction_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @eqv_reduction : !fir.ref<!fir.logical<4>>
|
! CHECK-LABEL: omp.declare_reduction @eqv_reduction_byref_l32 : !fir.ref<!fir.logical<4>>
|
||||||
! CHECK-SAME: alloc {
|
! CHECK-SAME: alloc {
|
||||||
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
||||||
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -89,7 +89,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -146,7 +146,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @eqv_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @eqv_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @eqv_reduction_byref_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @eqv_reduction_byref_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @eqv_reduction_byref_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @eqv_reduction : !fir.logical<4> init {
|
! CHECK-LABEL: omp.declare_reduction @eqv_reduction_l32 : !fir.logical<4> init {
|
||||||
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
||||||
! CHECK: %[[VAL_1:.*]] = arith.constant true
|
! CHECK: %[[VAL_1:.*]] = arith.constant true
|
||||||
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@eqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@eqv_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -81,7 +81,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@eqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@eqv_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -138,7 +138,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@eqv_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], @eqv_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], @eqv_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@eqv_reduction_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], @eqv_reduction_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], @eqv_reduction_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
24
flang/test/Lower/OpenMP/wsloop-reduction-logical-kinds.f90
Normal file
24
flang/test/Lower/OpenMP/wsloop-reduction-logical-kinds.f90
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s | FileCheck %s
|
||||||
|
|
||||||
|
! Check that logical reductions of different kinds do not end up using the same
|
||||||
|
! reduction declaration
|
||||||
|
|
||||||
|
! CHECK-LABEL: omp.declare_reduction @or_reduction_l64 : !fir.logical<8> init {
|
||||||
|
! CHECK-LABEL: omp.declare_reduction @or_reduction_l32 : !fir.logical<4> init {
|
||||||
|
|
||||||
|
subroutine test(a4, a8, sz)
|
||||||
|
integer :: sz
|
||||||
|
logical(4), dimension(sz) :: a4
|
||||||
|
logical(8), dimension(sz) :: a8
|
||||||
|
|
||||||
|
logical(4) :: res4 = .false.
|
||||||
|
logical(8) :: res8 = .false.
|
||||||
|
integer i
|
||||||
|
|
||||||
|
! CHECK: omp.wsloop private({{.*}}) reduction(@or_reduction_l32 {{.*}}, @or_reduction_l64 {{.*}}) {
|
||||||
|
!$omp do reduction(.or.:res4, res8)
|
||||||
|
do i = 1,sz
|
||||||
|
res4 = res4 .or. a4(i)
|
||||||
|
res8 = res8 .or. a8(i)
|
||||||
|
enddo
|
||||||
|
end subroutine
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @neqv_reduction : !fir.ref<!fir.logical<4>>
|
! CHECK-LABEL: omp.declare_reduction @neqv_reduction_byref_l32 : !fir.ref<!fir.logical<4>>
|
||||||
! CHECK-SAME: alloc {
|
! CHECK-SAME: alloc {
|
||||||
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
||||||
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -90,7 +90,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -149,7 +149,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @neqv_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @neqv_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @neqv_reduction_byref_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @neqv_reduction_byref_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @neqv_reduction_byref_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @neqv_reduction : !fir.logical<4> init {
|
! CHECK-LABEL: omp.declare_reduction @neqv_reduction_l32 : !fir.logical<4> init {
|
||||||
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
||||||
! CHECK: %[[VAL_1:.*]] = arith.constant false
|
! CHECK: %[[VAL_1:.*]] = arith.constant false
|
||||||
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@neqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@neqv_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -82,7 +82,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@neqv_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@neqv_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -141,7 +141,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@neqv_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], @neqv_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], @neqv_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@neqv_reduction_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], @neqv_reduction_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], @neqv_reduction_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @or_reduction : !fir.ref<!fir.logical<4>>
|
! CHECK-LABEL: omp.declare_reduction @or_reduction_byref_l32 : !fir.ref<!fir.logical<4>>
|
||||||
! CHECK-SAME: alloc {
|
! CHECK-SAME: alloc {
|
||||||
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
! CHECK: %[[REF:.*]] = fir.alloca !fir.logical<4>
|
||||||
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
! CHECK: omp.yield(%[[REF]] : !fir.ref<!fir.logical<4>>)
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @or_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @or_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -88,7 +88,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @or_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(byref @or_reduction_byref_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -145,7 +145,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @or_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @or_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @or_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(byref @or_reduction_byref_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], byref @or_reduction_byref_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], byref @or_reduction_byref_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
! NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||||
|
|
||||||
! CHECK-LABEL: omp.declare_reduction @or_reduction : !fir.logical<4> init {
|
! CHECK-LABEL: omp.declare_reduction @or_reduction_l32 : !fir.logical<4> init {
|
||||||
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.logical<4>):
|
||||||
! CHECK: %[[VAL_1:.*]] = arith.constant false
|
! CHECK: %[[VAL_1:.*]] = arith.constant false
|
||||||
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i1) -> !fir.logical<4>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@or_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@or_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reductionEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reductionEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -81,7 +81,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_13:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@or_reduction %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_10:.*]] : !fir.ref<i32>) reduction(@or_reduction_l32 %[[VAL_4]]#0 -> %[[VAL_15:.*]] : !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_16:.*]]) : i32 = (%[[VAL_12]]) to (%[[VAL_13]]) inclusive step (%[[VAL_14]]) {
|
||||||
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_11:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFsimple_reduction_switch_orderEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_17:.*]]:2 = hlfir.declare %[[VAL_15]] {uniq_name = "_QFsimple_reduction_switch_orderEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
@@ -138,7 +138,7 @@ end subroutine
|
|||||||
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_20:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
! CHECK: %[[VAL_21:.*]] = arith.constant 100 : i32
|
||||||
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i32
|
||||||
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@or_reduction %[[VAL_7]]#0 -> %[[VAL_23:.*]], @or_reduction %[[VAL_9]]#0 -> %[[VAL_24:.*]], @or_reduction %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
! CHECK: omp.wsloop private(@{{.*}} %{{.*}}#0 -> %[[VAL_18:.*]] : !fir.ref<i32>) reduction(@or_reduction_l32 %[[VAL_7]]#0 -> %[[VAL_23:.*]], @or_reduction_l32 %[[VAL_9]]#0 -> %[[VAL_24:.*]], @or_reduction_l32 %[[VAL_11]]#0 -> %[[VAL_25:.*]] : !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>) {
|
||||||
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
! CHECK-NEXT: omp.loop_nest (%[[VAL_26:.*]]) : i32 = (%[[VAL_20]]) to (%[[VAL_21]]) inclusive step (%[[VAL_22]]) {
|
||||||
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
! CHECK: %[[VAL_19:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFmultiple_reductionsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||||
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
! CHECK: %[[VAL_27:.*]]:2 = hlfir.declare %[[VAL_23]] {uniq_name = "_QFmultiple_reductionsEx"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
|
||||||
|
|||||||
Reference in New Issue
Block a user