[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 08:14:37 PST 2024


================
@@ -218,6 +218,9 @@ class DXILOpMapping<int opCode, DXILOpClass opClass, Intrinsic intrinsic, string
 // Concrete definition of DXIL Operation mapping to corresponding LLVM intrinsic
 def Sin  : DXILOpMapping<13, unary, int_sin,
                          "Returns sine(theta) for theta in radians.">;
+def Exp : DXILOpMapping<21, unary, int_exp,
+                         "Returns the base-e exponential of the x parameter."
----------------
farzonl wrote:

I'm confused by this answer opcode 21 is `exp` not` exp2` https://godbolt.org/z/MexG31jvv
exp docs says e^x  https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-exp


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


More information about the cfe-commits mailing list