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
60 lines
1.8 KiB
MLIR
60 lines
1.8 KiB
MLIR
// RUN: mlir-opt -llvm-legalize-for-export --split-input-file %s | FileCheck %s
|
|
|
|
// Verifies that duplicate successor with different arguments are deduplicated
|
|
// by introducing a new block that forwards its arguments to the original
|
|
// successor through an unconditional branch.
|
|
// CHECK-LABEL: @repeated_successor_different_args
|
|
llvm.func @repeated_successor_different_args(%arg0: i1, %arg1: i32, %arg2: i32) {
|
|
// CHECK: llvm.cond_br %{{.*}}, ^[[BB1:.*]]({{.*}}), ^[[BB2:.*]]({{.*}})
|
|
llvm.cond_br %arg0, ^bb1(%arg1: i32), ^bb1(%arg2: i32)
|
|
|
|
// CHECK: ^[[BB1]]({{.*}}):
|
|
^bb1(%arg3: i32):
|
|
llvm.return
|
|
|
|
// CHECK: ^[[BB2]](%[[ARG:.*]]: i32):
|
|
// CHECK: llvm.br ^[[BB1]](%[[ARG]] : i32)
|
|
}
|
|
|
|
// Verifies that duplicate successors without arguments do not lead to the
|
|
// introduction of new blocks during legalization.
|
|
// CHECK-LABEL: @repeated_successor_no_args
|
|
llvm.func @repeated_successor_no_args(%arg0: i1) {
|
|
// CHECK: llvm.cond_br
|
|
llvm.cond_br %arg0, ^bb1, ^bb1
|
|
|
|
// CHECK: ^{{.*}}:
|
|
^bb1:
|
|
llvm.return
|
|
|
|
// CHECK-NOT: ^{{.*}}:
|
|
}
|
|
|
|
// CHECK: @repeated_successor_openmp
|
|
llvm.func @repeated_successor_openmp(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i1) {
|
|
omp.wsloop {
|
|
omp.loop_nest (%arg4) : i64 = (%arg0) to (%arg1) step (%arg2) {
|
|
// CHECK: llvm.cond_br %{{.*}}, ^[[BB1:.*]]({{.*}}), ^[[BB2:.*]]({{.*}})
|
|
llvm.cond_br %arg3, ^bb1(%arg0 : i64), ^bb1(%arg1 : i64)
|
|
// CHECK: ^[[BB1]]
|
|
^bb1(%0: i64): // 2 preds: ^bb0, ^bb0
|
|
omp.yield
|
|
// CHECK: ^[[BB2]](%[[ARG:.*]]: i64):
|
|
// CHECK: llvm.br ^[[BB1]](%[[ARG]] : i64)
|
|
}
|
|
}
|
|
llvm.return
|
|
}
|
|
|
|
// -----
|
|
|
|
// This module won't have any LLVM dialect entities as input.
|
|
// Check that we don't crash when building LLVM entities.
|
|
// CHECK-LABEL:func @func1
|
|
func.func @func1(%arg0: i1, %arg1 : i1) {
|
|
// CHECK: llvm.br
|
|
cf.cond_br %arg0, ^bb40(%arg0 : i1), ^bb40(%arg1 : i1)
|
|
^bb40(%47: i1):
|
|
return
|
|
}
|