[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 22 10:38:15 PDT 2024
================
@@ -2547,6 +2588,10 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::rsqrt, GL::InverseSqrt);
case Intrinsic::spv_sign:
return selectSign(ResVReg, ResType, I);
+ case Intrinsic::spv_firstbituhigh: // There is no CL equivalent of FindUMsb
+ return selectFirstBitHigh(ResVReg, ResType, I, false);
----------------
farzonl wrote:
```suggestion
return selectFirstBitHigh(ResVReg, ResType, I, /*IsSigned=*/false);
```
https://github.com/llvm/llvm-project/pull/111082
More information about the cfe-commits
mailing list