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

2025-07-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/23350 Here is th

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

2025-07-11 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/147200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-11 Thread Sirui Mu via cfe-commits
Lancern wrote: I'm going to merge this and I'll send another patch to resolve the various nits in the comments. https://github.com/llvm/llvm-project/pull/147200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

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

2025-07-11 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

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

2025-07-11 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From fb556207b6a0504e0b767dd655ae5df146a70f30 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH] [CIR] Add bit reverse and byte reverse operations --- clang/include/

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

2025-07-10 Thread Andy Kaylor via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

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

2025-07-10 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

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

2025-07-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From cf2bf0bf66f22e8fdc35baf8d4176aa5af6588d2 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH 1/2] [CIR] Add bit reverse and byte reverse operations --- clang/incl

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

2025-07-10 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

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

2025-07-09 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

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

2025-07-09 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let description = [{ +The `cir.bit.re

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

2025-07-09 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From cf2bf0bf66f22e8fdc35baf8d4176aa5af6588d2 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH] [CIR] Add bit reverse and byte reverse operations --- clang/include/

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

2025-07-08 Thread Sirui Mu via cfe-commits
@@ -190,6 +190,26 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, expectedValue, probAttr); return RValue::get(result); } + + case Builtin::BI__builtin_bswap16: + case Builtin::BI__buil

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

2025-07-08 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From 2dc9775f797f944cb0f12f68bc914a0b4bb89609 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH] [CIR] Add bit reverse and byte reverse operations --- clang/include/

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

2025-07-08 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let description = [{ +The `cir.bit.re

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

2025-07-08 Thread Sirui Mu via cfe-commits
@@ -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

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

2025-07-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/147200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { xlauko wrote: These are inherited from `CIR_BitOpBase`. https://github.com/llvm/llvm-project

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let description = [{ +The `cir.bit.re

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let description = [{ +The `cir.bit.re

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -190,6 +190,26 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, expectedValue, probAttr); return RValue::get(result); } + + case Builtin::BI__builtin_bswap16: + case Builtin::BI__buil

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { xlauko wrote: I would also suggest to rename to `bitreverse` to mirror builtins name. Also d

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { xlauko wrote: ```suggestion def CIR_BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UI

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

2025-07-08 Thread Henrich Lauko via cfe-commits
@@ -2661,6 +2661,55 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let description = [{ +The `cir.bit.re

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

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This patch adds support for the following two builtin functions: - `__builtin_bswap`, represented by the `cir.bswap` operation. - `__builtin_bitreverse`, represented by the `cir.bit.r

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

2025-07-06 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/147200 This patch adds support for the following two builtin functions: - `__builtin_bswap`, represented by the `cir.bswap` operation. - `__builtin_bitreverse`, represented by the `cir.bit.reverse` operation. >From 35