CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
65 lines
3.3 KiB
Plaintext
65 lines
3.3 KiB
Plaintext
// RUN: fir-opt --cfg-conversion="always-execute-loop-body=true" %s | FileCheck %s
|
|
// RUN: fir-opt --cfg-conversion %s | FileCheck %s --check-prefix=NOOPT
|
|
|
|
func.func @x(%addr : !fir.ref<index>) {
|
|
%bound = arith.constant 452 : index
|
|
%step = arith.constant 1 : index
|
|
fir.do_loop %iv = %bound to %bound step %step {
|
|
fir.call @y(%addr) : (!fir.ref<index>) -> ()
|
|
}
|
|
return
|
|
}
|
|
|
|
func.func private @y(%addr : !fir.ref<index>)
|
|
|
|
|
|
// CHECK-LABEL: func @x(
|
|
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<index>) {
|
|
// CHECK: %[[VAL_1:.*]] = arith.constant 452 : index
|
|
// CHECK: %[[VAL_2:.*]] = arith.constant 1 : index
|
|
// CHECK: %[[VAL_3:.*]] = arith.subi %[[VAL_1]], %[[VAL_1]] : index
|
|
// CHECK: %[[VAL_4:.*]] = arith.addi %[[VAL_3]], %[[VAL_2]] : index
|
|
// CHECK: %[[VAL_5:.*]] = arith.divsi %[[VAL_4]], %[[VAL_2]] : index
|
|
// CHECK: %[[VAL_6:.*]] = arith.constant 0 : index
|
|
// CHECK: %[[VAL_7:.*]] = arith.cmpi sle, %[[VAL_5]], %[[VAL_6]] : index
|
|
// CHECK: %[[VAL_8:.*]] = arith.constant 1 : index
|
|
// CHECK: %[[VAL_9:.*]] = arith.select %[[VAL_7]], %[[VAL_8]], %[[VAL_5]] : index
|
|
// CHECK: br ^bb1(%[[VAL_1]], %[[VAL_9]] : index, index)
|
|
// CHECK: ^bb1(%[[VAL_10:.*]]: index, %[[VAL_11:.*]]: index):
|
|
// CHECK: %[[VAL_12:.*]] = arith.constant 0 : index
|
|
// CHECK: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_11]], %[[VAL_12]] : index
|
|
// CHECK: cond_br %[[VAL_13]], ^bb2, ^bb3
|
|
// CHECK: ^bb2:
|
|
// CHECK: fir.call @y(%[[VAL_0]]) : (!fir.ref<index>) -> ()
|
|
// CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_10]], %[[VAL_2]] overflow<nsw> : index
|
|
// CHECK: %[[VAL_15:.*]] = arith.constant 1 : index
|
|
// CHECK: %[[VAL_16:.*]] = arith.subi %[[VAL_11]], %[[VAL_15]] : index
|
|
// CHECK: br ^bb1(%[[VAL_14]], %[[VAL_16]] : index, index)
|
|
// CHECK: ^bb3:
|
|
// CHECK: return
|
|
// CHECK: }
|
|
// CHECK: func private @y(!fir.ref<index>)
|
|
|
|
// NOOPT-LABEL: func @x(
|
|
// NOOPT-SAME: %[[VAL_0:.*]]: !fir.ref<index>) {
|
|
// NOOPT: %[[VAL_1:.*]] = arith.constant 452 : index
|
|
// NOOPT: %[[VAL_2:.*]] = arith.constant 1 : index
|
|
// NOOPT: %[[VAL_3:.*]] = arith.subi %[[VAL_1]], %[[VAL_1]] : index
|
|
// NOOPT: %[[VAL_4:.*]] = arith.addi %[[VAL_3]], %[[VAL_2]] : index
|
|
// NOOPT: %[[VAL_5:.*]] = arith.divsi %[[VAL_4]], %[[VAL_2]] : index
|
|
// NOOPT: br ^bb1(%[[VAL_1]], %[[VAL_5]] : index, index)
|
|
// NOOPT: ^bb1(%[[VAL_6:.*]]: index, %[[VAL_7:.*]]: index):
|
|
// NOOPT: %[[VAL_8:.*]] = arith.constant 0 : index
|
|
// NOOPT: %[[VAL_9:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_8]] : index
|
|
// NOOPT: cond_br %[[VAL_9]], ^bb2, ^bb3
|
|
// NOOPT: ^bb2:
|
|
// NOOPT: fir.call @y(%[[VAL_0]]) : (!fir.ref<index>) -> ()
|
|
// NOOPT: %[[VAL_10:.*]] = arith.addi %[[VAL_6]], %[[VAL_2]] overflow<nsw> : index
|
|
// NOOPT: %[[VAL_11:.*]] = arith.constant 1 : index
|
|
// NOOPT: %[[VAL_12:.*]] = arith.subi %[[VAL_7]], %[[VAL_11]] : index
|
|
// NOOPT: br ^bb1(%[[VAL_10]], %[[VAL_12]] : index, index)
|
|
// NOOPT: ^bb3:
|
|
// NOOPT: return
|
|
// NOOPT: }
|
|
// NOOPT: func private @y(!fir.ref<index>)
|