brintos

brintos / llvm-project-archived public Read only

0
0
Text · 773 B · 3e5f592 Raw
28 lines · plain
1// RUN: mlir-opt --convert-math-to-spirv %s | FileCheck %s2 3module attributes {4  spirv.target_env = #spirv.target_env<#spirv.vce<v1.0, [Shader], []>, #spirv.resource_limits<>>5} {6 7  // CHECK-LABEL: @fpclassify8  func.func @fpclassify(%x: f32, %v: vector<4xf32>) {9    // CHECK: spirv.IsFinite %{{.*}} : f3210    %0 = math.isfinite %x : f3211    // CHECK: spirv.IsFinite %{{.*}} : vector<4xf32>12    %1 = math.isfinite %v : vector<4xf32>13 14    // CHECK: spirv.IsNan %{{.*}} : f3215    %2 = math.isnan %x : f3216    // CHECK: spirv.IsNan %{{.*}} : vector<4xf32>17    %3 = math.isnan %v : vector<4xf32>18 19    // CHECK: spirv.IsInf %{{.*}} : f3220    %4 = math.isinf %x : f3221    // CHECK: spirv.IsInf %{{.*}} : vector<4xf32>22    %5 = math.isinf %v : vector<4xf32>23 24    return25  }26 27}28