[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 8 06:27:48 PDT 2025


================
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt",
   }];
 }
 
+def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> {
----------------
Lancern wrote:

Well I think we need to think about what the exact scope of `CIR_BitOpBase` is and whether the bit reverse operation should be one of it. I'm naming it `bit.reverse` because I think it should follow the `CIR_BitOpBase` convention.

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


More information about the cfe-commits mailing list