[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

Sarah Spall via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 16:18:15 PDT 2024


================
@@ -2625,6 +2645,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
     return selectFmix(ResVReg, ResType, I);
   case Intrinsic::spv_length:
     return selectLength(ResVReg, ResType, I);
+  case Intrinsic::spv_degrees:
+    return selectDegrees(ResVReg, ResType, I);
----------------
spall wrote:

Assuming it does take 1 operand, can you use selectExtInst here instead of a custom function? 

https://github.com/llvm/llvm-project/pull/111209


More information about the cfe-commits mailing list