Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

113 lines
3.2 KiB
MLIR

// RUN: mlir-opt %s --split-input-file --verify-diagnostics
// expected-error @below {{bit-vector must have at least a width of one}}
func.func @at_least_size_one(%arg0: !smt.bv<0>) {
return
}
// -----
// expected-error @below {{bit-vector must have at least a width of one}}
func.func @positive_width(%arg0: !smt.bv<-1>) {
return
}
// -----
func.func @attr_type_and_return_type_match() {
// expected-error @below {{inferred type(s) '!smt.bv<1>' are incompatible with return type(s) of operation '!smt.bv<32>'}}
// expected-error @below {{failed to infer returned types}}
%c0_bv32 = "smt.bv.constant"() <{value = #smt.bv<0> : !smt.bv<1>}> : () -> !smt.bv<32>
return
}
// -----
func.func @invalid_bitvector_attr() {
// expected-error @below {{explicit bit-vector type required}}
smt.bv.constant #smt.bv<5>
}
// -----
func.func @invalid_bitvector_attr() {
// expected-error @below {{integer value out of range for given bit-vector type}}
smt.bv.constant #smt.bv<32> : !smt.bv<2>
}
// -----
func.func @invalid_bitvector_attr() {
// expected-error @below {{integer value out of range for given bit-vector type}}
smt.bv.constant #smt.bv<-4> : !smt.bv<2>
}
// -----
func.func @extraction(%arg0: !smt.bv<32>) {
// expected-error @below {{range to be extracted is too big, expected range starting at index 20 of length 16 requires input width of at least 36, but the input width is only 32}}
smt.bv.extract %arg0 from 20 : (!smt.bv<32>) -> !smt.bv<16>
return
}
// -----
func.func @concat(%arg0: !smt.bv<32>) {
// expected-error @below {{inferred type(s) '!smt.bv<64>' are incompatible with return type(s) of operation '!smt.bv<33>'}}
// expected-error @below {{failed to infer returned types}}
"smt.bv.concat"(%arg0, %arg0) {} : (!smt.bv<32>, !smt.bv<32>) -> !smt.bv<33>
return
}
// -----
func.func @repeat_result_type_no_multiple_of_input_type(%arg0: !smt.bv<32>) {
// expected-error @below {{result bit-vector width must be a multiple of the input bit-vector width}}
"smt.bv.repeat"(%arg0) : (!smt.bv<32>) -> !smt.bv<65>
return
}
// -----
func.func @repeat_negative_count(%arg0: !smt.bv<32>) {
// expected-error @below {{integer must be positive}}
smt.bv.repeat -2 times %arg0 : !smt.bv<32>
return
}
// -----
// The parser has to extract the bit-width of the input and thus we need to
// test that this is handled correctly in the parser, we cannot just rely on the
// verifier.
func.func @repeat_wrong_input_type(%arg0: !smt.bool) {
// expected-error @below {{input must have bit-vector type}}
smt.bv.repeat 2 times %arg0 : !smt.bool
return
}
// -----
func.func @repeat_count_too_large(%arg0: !smt.bv<32>) {
// expected-error @below {{integer must fit into 63 bits}}
smt.bv.repeat 18446744073709551617 times %arg0 : !smt.bv<32>
return
}
// -----
func.func @repeat_result_type_bitwidth_too_large(%arg0: !smt.bv<9223372036854775807>) {
// expected-error @below {{result bit-width (provided integer times bit-width of the input type) must fit into 63 bits}}
smt.bv.repeat 2 times %arg0 : !smt.bv<9223372036854775807>
return
}
// -----
func.func @invalid_bv2int_signedness() {
%c5_bv32 = smt.bv.constant #smt.bv<5> : !smt.bv<32>
// expected-error @below {{expected ':'}}
%bv2int = smt.bv2int %c5_bv32 unsigned : !smt.bv<32>
return
}