[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/71687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-16 Thread Aaron Ballman via cfe-commits
@@ -59,13 +59,54 @@ static void pushInt(InterpState , int32_t Val) { llvm_unreachable("Int isn't 16 or 32 bit?"); } -static bool retInt(InterpState , CodePtr OpPC, APValue ) { - PrimType IntType = getIntPrimType(S); - if (IntType == PT_Sint32) -return Ret(S, OpPC,

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/71687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/71687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71687 >From f10454ffa4337726e6f3b324a38ffc1fd381b54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 15:51:44 +0100 Subject: [PATCH] [clang][Interp] Implement __builtin_bitreverse

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-15 Thread Timm Baeder via cfe-commits
@@ -59,13 +59,54 @@ static void pushInt(InterpState , int32_t Val) { llvm_unreachable("Int isn't 16 or 32 bit?"); } -static bool retInt(InterpState , CodePtr OpPC, APValue ) { - PrimType IntType = getIntPrimType(S); - if (IntType == PT_Sint32) -return Ret(S, OpPC,

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-15 Thread Aaron Ballman via cfe-commits
@@ -59,13 +59,54 @@ static void pushInt(InterpState , int32_t Val) { llvm_unreachable("Int isn't 16 or 32 bit?"); } -static bool retInt(InterpState , CodePtr OpPC, APValue ) { - PrimType IntType = getIntPrimType(S); - if (IntType == PT_Sint32) -return Ret(S, OpPC,

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. The changes seem reasonable to me but I think we should start putting some effort in to support _BitInt because I have a sneaking suspicion that will be hard to support with all the power-of-two literals being used, and the more

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/71687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Since the return value of this function is slightly more involved than the void/bool/int/size_t return values we've seen so far, also refactor this. --- Full diff:

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71687 Since the return value of this function is slightly more involved than the void/bool/int/size_t return values we've seen so far, also refactor this. >From 140555c8af75fcf117d10d7877f4cd248b9f7480 Mon Sep 17