[SPIR-V] Legalize the llvm.is.fpclass
intrinsic
#137892
Labels
backend:SPIR-V
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
LLVM Language Reference:
llvm.is.fpclass
The lowering of
llvm.is.fpclass
depends on the compile-time constant operandi32 <test>
.Valid bits for
<test>
are defined in an enum named FPClassTest.The following FPClassTest cases are of interest:
FPClassTest::fcInf
,FPClassTest::fcNan
,FPClassTest::fcFinite
,FPClassTest::fcNormal
map directly to SPIR-V OpsThe lowering of
llvm.is.fpclass
to both SPIR-V and DirectX will simplify the codegen for HLSL intrinsicsisinf
,isnan
, andisfinite
SPIRV Ops
OpIsInf
OpIsNan
OpIsNormal
OpIsFinite
Note: The SPIRV specification states that the results of these ops depends on the floating-point encoding used. However, there are currently no alternative floating-point encodings listed in the specification.
The text was updated successfully, but these errors were encountered: