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
128 lines
4.3 KiB
MLIR
128 lines
4.3 KiB
MLIR
// RUN: yaml2obj %S/inputs/div.yaml.wasm -o - | mlir-translate --import-wasm | FileCheck %s
|
|
|
|
/* Source code used to create this test:
|
|
(module
|
|
(func (export "div_u_i32") (result i32)
|
|
i32.const 10
|
|
i32.const 2
|
|
i32.div_u
|
|
)
|
|
|
|
(func (export "div_u_i32_zero") (result i32)
|
|
i32.const 10
|
|
i32.const 0
|
|
i32.div_u
|
|
)
|
|
|
|
(func (export "div_s_i32") (result i32)
|
|
i32.const 10
|
|
i32.const 2
|
|
i32.div_s
|
|
)
|
|
|
|
(func (export "div_s_i32_zero") (result i32)
|
|
i32.const 10
|
|
i32.const 0
|
|
i32.div_s
|
|
)
|
|
|
|
(func (export "div_u_i64") (result i64)
|
|
i64.const 10
|
|
i64.const 2
|
|
i64.div_u
|
|
)
|
|
|
|
;; explode
|
|
(func (export "div_u_i64_zero") (result i64)
|
|
i64.const 10
|
|
i64.const 0
|
|
i64.div_u
|
|
)
|
|
|
|
(func (export "div_s_i64") (result i64)
|
|
i64.const 10
|
|
i64.const 2
|
|
i64.div_s
|
|
)
|
|
|
|
;; explode
|
|
(func (export "div_s_i64_zero") (result i64)
|
|
i64.const 10
|
|
i64.const 0
|
|
i64.div_s
|
|
)
|
|
|
|
(func (export "div_f32") (result f32)
|
|
f32.const 10
|
|
f32.const 2
|
|
f32.div
|
|
)
|
|
|
|
(func (export "div_f64") (result f64)
|
|
f64.const 10
|
|
f64.const 2
|
|
f64.div
|
|
)
|
|
)
|
|
*/
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_u_i32() -> i32 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i32
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2 : i32
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_ui %[[VAL_0]] %[[VAL_1]] : i32
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i32
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_u_i32_zero() -> i32 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i32
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 0 : i32
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_ui %[[VAL_0]] %[[VAL_1]] : i32
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i32
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_s_i32() -> i32 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i32
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2 : i32
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_si %[[VAL_0]] %[[VAL_1]] : i32
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i32
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_s_i32_zero() -> i32 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i32
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 0 : i32
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_si %[[VAL_0]] %[[VAL_1]] : i32
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i32
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_u_i64() -> i64 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i64
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2 : i64
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_ui %[[VAL_0]] %[[VAL_1]] : i64
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i64
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_u_i64_zero() -> i64 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i64
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 0 : i64
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_ui %[[VAL_0]] %[[VAL_1]] : i64
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i64
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_s_i64() -> i64 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i64
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2 : i64
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_si %[[VAL_0]] %[[VAL_1]] : i64
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i64
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_s_i64_zero() -> i64 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 10 : i64
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 0 : i64
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div_si %[[VAL_0]] %[[VAL_1]] : i64
|
|
// CHECK: wasmssa.return %[[VAL_2]] : i64
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_f32() -> f32 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 1.000000e+01 : f32
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2.000000e+00 : f32
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div %[[VAL_0]] %[[VAL_1]] : f32
|
|
// CHECK: wasmssa.return %[[VAL_2]] : f32
|
|
|
|
// CHECK-LABEL: wasmssa.func exported @div_f64() -> f64 {
|
|
// CHECK: %[[VAL_0:.*]] = wasmssa.const 1.000000e+01 : f64
|
|
// CHECK: %[[VAL_1:.*]] = wasmssa.const 2.000000e+00 : f64
|
|
// CHECK: %[[VAL_2:.*]] = wasmssa.div %[[VAL_0]] %[[VAL_1]] : f64
|
|
// CHECK: wasmssa.return %[[VAL_2]] : f64
|