[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From 2dfe7b80b73a975a17ad797ff38c9e5e11cfb2ea Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/7] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-31 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > Oh excuse me, there's currently no target-specific behaviour. I missed the > > HasFallback in > > HasFallback only applies to the two-argument form. Oh yes, thank you. I've fixed that now. The behaviour is unconditionally zero-is-undef. > > I don't have a strong opinio

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Oh excuse me, there's currently no target-specific behaviour. I missed the > HasFallback in HasFallback only applies to the two-argument form. I don't have a strong opinion about the names. The whole "fallback behavior" thing was written back in the early

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-30 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > Also does this have the same > > maybe-defined-maybe-not-depending-on-target-preference as __builtin_clz? > > Can you document that explicitly if it is or not? > > I've always hated that behavior and think it's absurd. My main hesitation > > is if we're doing something l

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-30 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Also does this have the same > maybe-defined-maybe-not-depending-on-target-preference as __builtin_clz? Can > you document that explicitly if it is or not? > > I've always hated that behavior and think it's absurd. My main hesitation is > if we're doing something less con

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-18 Thread Eli Friedman via cfe-commits
@@ -847,6 +848,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-17 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Fraser Cormack via cfe-commits
@@ -847,6 +848,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From 93112f0d5f0a8f6c8b1803a61d549701ba476f20 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/6] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Eli Friedman via cfe-commits
@@ -847,6 +848,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From 93112f0d5f0a8f6c8b1803a61d549701ba476f20 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/5] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From 93112f0d5f0a8f6c8b1803a61d549701ba476f20 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/4] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-16 Thread Fraser Cormack via cfe-commits
@@ -847,6 +848,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-06-24 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-05-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping, thanks. https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-05-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From 8f445e8db9378779d822388060ee3be15f360751 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/4] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-05-13 Thread Fraser Cormack via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-15 Thread Fraser Cormack via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-15 Thread Fraser Cormack via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-15 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From d8bae11f1e156b83de9a41ceb479d348d7d168b1 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/4] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-10 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Friendly ping https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Fraser Cormack (frasercrmck) Changes These builtins are modeled on the clzg/ctzg builtins, which accept an optional second argument. This second argument is returned if the first argument is 0. --- Full diff: https://github.com/ll

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping, thanks https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From c0eef87f4301a9725b7d81e78875a816d3cdf7cb Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/3] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin { let Prototype = "void(...)"; } +def ElementwiseClz : Builtin { + let Spellings = ["__builtin_elementwise_clz"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; + let Prototype = "void(...)"; +} +

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From c0eef87f4301a9725b7d81e78875a816d3cdf7cb Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/2] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin { let Prototype = "void(...)"; } +def ElementwiseClz : Builtin { + let Spellings = ["__builtin_elementwise_clz"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; + let Prototype = "void(...)"; +} +

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin { let Prototype = "void(...)"; } +def ElementwiseClz : Builtin { + let Spellings = ["__builtin_elementwise_clz"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; + let Prototype = "void(...)"; +} +

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Timm Baeder via cfe-commits
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin { let Prototype = "void(...)"; } +def ElementwiseClz : Builtin { + let Spellings = ["__builtin_elementwise_clz"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; + let Prototype = "void(...)"; +} +

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/131995 These builtins are modeled on the clzg/ctzg builtins, which accept an optional second argument. This second argument is returned if the first argument is 0. >From c0eef87f4301a9725b7d81e78875a816d3cdf7cb Mo