[llvm] [DXIL] Add lowering for `reversebits` and `trunc` (PR #86909)
S. Bharadwaj Yadavalli via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 05:31:34 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>]>;
----------------
bharadwajy wrote:
```suggestion
"Returns the specified value with its bits reversed.">;
```
Since the inherited types of `int_bitreverse` are valid for `Rbits`, overriding is not necessary,
Additionally, consider adding this record after `Trunc` to maintain ascending order of opcode value.
https://github.com/llvm/llvm-project/pull/86909
More information about the llvm-commits
mailing list