libgccjit: Add count zeroes builtins to ensure_optimization_builtins_exist
Checks
Commit Message
Hi.
This patch adds some missing builtins that can be generated by
optimizations.
I'm not sure how to add a test for this one.
Do you know the C code that can be optimized to a builtin_clz?
Thanks for the review.
Comments
On Thu, 2024-02-15 at 11:32 -0500, Antoni Boucher wrote:
> Hi.
> This patch adds some missing builtins that can be generated by
> optimizations.
> I'm not sure how to add a test for this one.
> Do you know the C code that can be optimized to a builtin_clz?
I don't. Given a reproducer we could probably figure it out, but it's
probably not worth bothering.
> Thanks for the review.
Thanks, looks good to me for trunk.
Dave
From 578cb40bd333abf57e5b3b08d3453bdcf7ad80b5 Mon Sep 17 00:00:00 2001
From: Antoni Boucher <bouanto@zoho.com>
Date: Thu, 8 Feb 2024 21:48:27 -0500
Subject: [PATCH] libgccjit: Add count zeroes builtins to
ensure_optimization_builtins_exist
gcc/jit/ChangeLog:
* jit-builtins.cc (ensure_optimization_builtins_exist): Add
missing builtins.
---
gcc/jit/jit-builtins.cc | 6 ++++++
1 file changed, 6 insertions(+)
@@ -612,6 +612,12 @@ builtins_manager::ensure_optimization_builtins_exist ()
(void)get_builtin_function_by_id (BUILT_IN_POPCOUNT);
(void)get_builtin_function_by_id (BUILT_IN_POPCOUNTL);
(void)get_builtin_function_by_id (BUILT_IN_POPCOUNTLL);
+ (void)get_builtin_function_by_id (BUILT_IN_CLZ);
+ (void)get_builtin_function_by_id (BUILT_IN_CTZ);
+ (void)get_builtin_function_by_id (BUILT_IN_CLZL);
+ (void)get_builtin_function_by_id (BUILT_IN_CTZL);
+ (void)get_builtin_function_by_id (BUILT_IN_CLZLL);
+ (void)get_builtin_function_by_id (BUILT_IN_CTZLL);
}
/* Playback support. */
--
2.43.0