brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4a51f0b Raw
30 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 6define noundef half @fmad_half(half noundef %a, half noundef %b, half noundef %c) #0 {7entry:8; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Fma %[[#]] %[[#]] %[[#]]9  %hlsl.fmad = call half @llvm.fmuladd.f16(half %a, half %b, half %c)10  ret half %hlsl.fmad11}12 13define noundef float @fmad_float(float noundef %a, float noundef %b, float noundef %c) #0 {14entry:15; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Fma %[[#]] %[[#]] %[[#]]16  %hlsl.fmad = call float @llvm.fmuladd.f32(float %a, float %b, float %c)17  ret float %hlsl.fmad18}19 20define noundef double @fmad_double(double noundef %a, double noundef %b, double noundef %c) {21entry:22; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Fma %[[#]] %[[#]] %[[#]]23  %hlsl.fmad = call double @llvm.fmuladd.f64(double %a, double %b, double %c)24  ret double %hlsl.fmad25}26 27declare half @llvm.fmuladd.f16(half, half, half)28declare float @llvm.fmuladd.f32(float, float, float)29declare double @llvm.fmuladd.f64(double, double, double)30