[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/6730 Here is the relevant piece of the b

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-26 Thread via cfe-commits
https://github.com/c8ef closed https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-26 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
c8ef wrote: > Update LanguageExtensions.rst to mention __builtin_elementwise_popcount is > constexpr compatible Done. https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/8] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Update LanguageExtensions.rst to mention __builtin_elementwise_popcount is constexpr compatible https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/7] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
@@ -797,3 +797,21 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
@@ -666,40 +666,16 @@ void test_builtin_elementwise_log2(float f1, float f2, double d1, double d2, vf2 = __builtin_elementwise_log2(vf1); } -void test_builtin_elementwise_popcount(si8 vi1, si8 vi2, - long long int i1, long long int i2, short

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
@@ -11302,6 +11303,35 @@ static bool handleVectorElementCast(EvalInfo &Info, const FPOptions FPO, return false; } +bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { + if (!IsConstantEvaluatedBuiltinCall(E)) +return ExprEvaluatorBaseTy::VisitCallExpr(E); + +

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/6] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -11302,6 +11303,35 @@ static bool handleVectorElementCast(EvalInfo &Info, const FPOptions FPO, return false; } +bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { + if (!IsConstantEvaluatedBuiltinCall(E)) +return ExprEvaluatorBaseTy::VisitCallExpr(E); + +

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -797,3 +797,21 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -666,40 +666,16 @@ void test_builtin_elementwise_log2(float f1, float f2, double d1, double d2, vf2 = __builtin_elementwise_log2(vf1); } -void test_builtin_elementwise_popcount(si8 vi1, si8 vi2, - long long int i1, long long int i2, short

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
@@ -797,3 +797,8 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL}

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/5] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/4] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/3] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
@@ -797,3 +797,8 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL}

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: `__builtin_elementwise_popcount` can be used with a scalar value - please test that as well https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes Part of #51787. This patch adds constexpr support for the built-in elementwise popcount function. --- Full diff: https://github.com/llvm/llvm-project/pull/117473.diff 4 Files Affected: - (modified) clang/docs/Relea

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef ready_for_review https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits