Debian Codegraph @

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/pow.ll

raw
1 ; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
3
4 ; CHECK: OpExtInstImport "GLSL.std.450"
5
6 define noundef float @pow_float(float noundef %a,float noundef %b) {
7 entry:
8 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Pow %[[#]]
9 %elt.pow = call float @llvm.pow.f32(float %a,float %b)
10 ret float %elt.pow
11 }
12
13 define noundef half @pow_half(half noundef %a, half noundef %b) {
14 entry:
15 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Pow %[[#]]
16 %elt.pow = call half @llvm.pow.f16(half %a, half %b)
17 ret half %elt.pow
18 }
19
20 declare half @llvm.pow.f16(half,half)
21 declare float @llvm.pow.f32(float,float)