brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1018 B · c62c3da Raw
29 lines · plain
1; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}3; CHECK: OpExtInstImport "GLSL.std.450"4 5define noundef half @test_fmax_half(half noundef %a, half noundef %b) {6entry:7; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]8  %0 = call half @llvm.maxnum.f16(half %a, half %b)9  ret half %010}11 12define noundef float @test_fmax_float(float noundef %a, float noundef %b) {13entry:14; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]15  %0 = call float @llvm.maxnum.f32(float %a, float %b)16  ret float %017}18 19define noundef double @test_fmax_double(double noundef %a, double noundef %b) {20entry:21; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMax %[[#]] %[[#]]22  %0 = call double @llvm.maxnum.f64(double %a, double %b)23  ret double %024}25 26declare half @llvm.maxnum.f16(half, half)27declare float @llvm.maxnum.f32(float, float)28declare double @llvm.maxnum.f64(double, double)29