Implement the firstbitlow
HLSL Function
#99116
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
firstbitlow
clang builtin,firstbitlow
clang builtin withhlsl_intrinsics.h
firstbitlow
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
firstbitlow
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/firstbitlow.hlsl
clang/test/SemaHLSL/BuiltIns/firstbitlow-errors.hlsl
int_dx_firstbitlow
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_firstbitlow
to32
inDXIL.td
firstbitlow.ll
andfirstbitlow_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_firstbitlow
intrinsic inIntrinsicsSPIRV.td
firstbitlow
lowering and map it toint_spv_firstbitlow
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/firstbitlow.ll
DirectX
SPIR-V
FindILsb:
Description:
FindILsb
Integer least-significant bit.
Results in the bit number of the least-significant 1-bit in the binary
representation of Value. If Value is 0, the result is -1.
Result Type and the type of Value must both be integer scalar or
integer vector types. Result Type and operand types must have the same
number of components with the same component width. Results are computed
per component.
73
<id>
Value
Test Case(s)
Example 1
HLSL:
Returns the location of the first set bit starting from the lowest order bit and working upward, per component.
Syntax
Parameters
value [in]
Type: int
The input value.
Return value
Type: int
The location of the first set bit.
Remarks
The following overloaded versions are also available:
Minimum Shader Model
This function is supported in the following shader models.
This function is supported in the following types of shaders:
See also
Intrinsic Functions
Shader Model 5
The text was updated successfully, but these errors were encountered: