brintos

brintos / llvm-project-archived public Read only

0
0
Text · 675 B · 62f98b3 Raw
22 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 float @log2_float(float noundef %a) {7entry:8; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Log2 %[[#]]9  %elt.log2 = call float @llvm.log2.f32(float %a)10  ret float %elt.log211}12 13define noundef half @log2_half(half noundef %a) {14entry:15; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Log2 %[[#]]16  %elt.log2 = call half @llvm.log2.f16(half %a)17  ret half %elt.log218}19 20declare half @llvm.log2.f16(half)21declare float @llvm.log2.f32(float)22