[llvm] [DXIL] Add lowering for `reversebits` and `trunc` (PR #86909)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 07:34:29 PDT 2024


================
@@ -285,13 +285,19 @@ def RSqrt : DXILOpMapping<25, unary, int_dx_rsqrt,
                          "Returns the reciprocal of the square root of the specified value."
                          "rsqrt(x) = 1 / sqrt(x).",
                          [llvm_halforfloat_ty, LLVMMatchType<0>]>;
+def Rbits : DXILOpMapping<30, unary, int_bitreverse,
+                         "Returns the specified value with its bits reversed.",
+                         [llvm_anyint_ty, LLVMMatchType<0>]>;
----------------
farzonl wrote:

Does it make sense to do the narrower scalar type in this pr?  Alternatively, should we leave this as is, as a placeholder for the future refinement? 

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


More information about the llvm-commits mailing list