ChangeLog-2010: (integer_three_node): Add. ChangeLog-2010: NULL_TREE in build_int_cst calls. Initialize the integer_three_node. builtins.cc: arg2 = integer_three_node; cp/ChangeLog-2010: * decl.c (integer_three_node): Remove. cp/ChangeLog-2010: (cxx_init_decl_processing): Do not initialize the integer_three_node. cp/ChangeLog-2010: * cp-tree.h (integer_three_node): Remove. tree-ssa-loop-prefetch.cc: local = nontemporal ? integer_zero_node : integer_three_node; tree.cc: integer_three_node = build_int_cst (integer_type_node, 3); tree.h:#define integer_three_node global_trees[TI_INTEGER_THREE] Those are the only references to integer_three_node in the whole GCC tree. The use in builtins.cc is definitely not needed as it just calls expand_normal right afterwards. The use in tree-ssa-loop-prefetch.cc can just be replaced with `build_int_cst (integer_type_node, 3);` as this is definitely not a hot loop and move over the pass is not enabled for most of the time anyways.
.
https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661831.html https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661832.html
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:4d2cbe2bbedbdbc609683f7fb491b3e02add15b3 commit r15-3320-g4d2cbe2bbedbdbc609683f7fb491b3e02add15b3 Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Thu Aug 29 11:01:56 2024 -0700 middle-end: Remove integer_three_node [PR116537] After the small expansion patch for __builtin_prefetch, the only use of integer_three_node is inside tree-ssa-loop-prefetch.cc so let's remove it as the loop prefetch pass is not enabled these days by default and having a tree node around just for that pass is a little wasteful. Integer constants are also shared these days so calling build_int_cst will use the cached node anyways. Bootstrapped and tested on x86_64-linux. PR middle-end/116537 gcc/ChangeLog: * tree-core.h (enum tree_index): Remove TI_INTEGER_THREE * tree-ssa-loop-prefetch.cc (issue_prefetch_ref): Call build_int_cst instead of using integer_three_node. * tree.cc (build_common_tree_nodes): Remove initialization of integer_three_node. * tree.h (integer_three_node): Delete. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Fixed.