brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · ba6995b Raw
32 lines · plain
1// RUN: mlir-opt -split-input-file %s -verify-diagnostics2 3func.func @complex_constant_wrong_array_attribute_length() {4  // expected-error @+1 {{requires 'value' to be a complex constant, represented as array of two values}}5  %0 = complex.constant [1.0 : f32] : complex<f32>6  return7}8 9// -----10 11func.func @complex_constant_wrong_element_types() {12  // expected-error @+1 {{requires attribute's element types ('f32', 'f32') to match the element type of the op's return type ('f64')}}13  %0 = complex.constant [1.0 : f32, -1.0 : f32] : complex<f64>14  return15}16 17// -----18 19func.func @complex_constant_two_different_element_types() {20  // expected-error @+1 {{requires attribute's element types ('f32', 'f64') to match the element type of the op's return type ('f64')}}21  %0 = complex.constant [1.0 : f32, -1.0 : f64] : complex<f64>22  return23}24 25// -----26 27func.func @complex_bitcast_i64(%arg0 : i64) {28  // expected-error @+1 {{op requires that either input or output has a complex type}}29  %0 = complex.bitcast %arg0: i64 to f6430  return31}32