1 // RUN: mlir-opt -split-input-file -verify-diagnostics %s | FileCheck %s
3 //===----------------------------------------------------------------------===//
5 //===----------------------------------------------------------------------===//
7 func.func @undef() -> () {
8 // CHECK: %{{.*}} = spirv.Undef : f32
10 // CHECK: %{{.*}} = spirv.Undef : vector<4xf32>
11 %1 = spirv.Undef : vector<4xf32>
17 func.func @undef() -> () {
18 // expected-error @+1{{expected non-function type}}
25 func.func @undef() -> () {
26 // expected-error @+1{{expected ':'}}
33 func.func @assume_true(%arg : i1) -> () {
34 // CHECK: spirv.KHR.AssumeTrue %{{.*}}
35 spirv.KHR.AssumeTrue %arg
41 func.func @assume_true(%arg : f32) -> () {
42 // expected-error @+2{{use of value '%arg' expects different type than prior uses: 'i1' vs 'f32'}}
43 // expected-note @-2 {{prior use here}}
44 spirv.KHR.AssumeTrue %arg