brintos

brintos / llvm-project-archived public Read only

0
0
Text · 919 B · 9c277cf Raw
39 lines · plain
1// RUN: mlir-opt -split-input-file -convert-ub-to-spirv %s | FileCheck %s2 3module attributes {4  spirv.target_env = #spirv.target_env<5    #spirv.vce<v1.0, [Int8, Int16, Int64, Float16, Float64, Shader], []>, #spirv.resource_limits<>>6} {7 8// CHECK-LABEL: @check_poison9func.func @check_poison() {10// CHECK: {{.*}} = spirv.Undef : i3211  %0 = ub.poison : index12// CHECK: {{.*}} = spirv.Undef : i1613  %1 = ub.poison : i1614// CHECK: {{.*}} = spirv.Undef : f6415  %2 = ub.poison : f6416// CHECK: {{.*}} = spirv.Undef : vector<4xf32>17  %3 = ub.poison : vector<4xf32>18  return19}20 21}22 23// -----24 25module attributes {26  spirv.target_env = #spirv.target_env<27    #spirv.vce<v1.0, [Int8, Int16, Int64, Float16, Float64, Shader], []>, #spirv.resource_limits<>>28} {29// CHECK-LABEL: @check_unrechable30func.func @check_unrechable(%c: i1) {31  cf.cond_br %c, ^bb1, ^bb232^bb1:33// CHECK: spirv.Unreachable34  ub.unreachable35^bb2:36  return37}38}39