brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · c3ad1b5 Raw
31 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 4; CHECK: OpExtInstImport "GLSL.std.450"5; CHECK: OpMemoryModel Logical GLSL4506 7define noundef half @test_fmax_half(half noundef %a, half noundef %b) {8entry:9; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMin %[[#]] %[[#]]10  %0 = call half @llvm.minnum.f16(half %a, half %b)11  ret half %012}13 14define noundef float @test_fmax_float(float noundef %a, float noundef %b) {15entry:16; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMin %[[#]] %[[#]]17  %0 = call float @llvm.minnum.f32(float %a, float %b)18  ret float %019}20 21define noundef double @test_fmax_double(double noundef %a, double noundef %b) {22entry:23; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] NMin %[[#]] %[[#]]24  %0 = call double @llvm.minnum.f64(double %a, double %b)25  ret double %026}27 28declare half @llvm.minnum.f16(half, half)29declare float @llvm.minnum.f32(float, float)30declare double @llvm.minnum.f64(double, double)31