// RUN: mlir-opt -split-input-file -convert-ub-to-spirv %s | FileCheck %s module attributes { spirv.target_env = #spirv.target_env< #spirv.vce, #spirv.resource_limits<>> } { // CHECK-LABEL: @check_poison func.func @check_poison() { // CHECK: {{.*}} = spirv.Undef : i32 %0 = ub.poison : index // CHECK: {{.*}} = spirv.Undef : i16 %1 = ub.poison : i16 // CHECK: {{.*}} = spirv.Undef : f64 %2 = ub.poison : f64 // CHECK: {{.*}} = spirv.Undef : vector<4xf32> %3 = ub.poison : vector<4xf32> return } } // ----- module attributes { spirv.target_env = #spirv.target_env< #spirv.vce, #spirv.resource_limits<>> } { // CHECK-LABEL: @check_unrechable func.func @check_unrechable(%c: i1) { cf.cond_br %c, ^bb1, ^bb2 ^bb1: // CHECK: spirv.Unreachable ub.unreachable ^bb2: return } }