From: Andrew Pinski Date: Fri, 19 May 2023 18:36:39 +0000 (+0000) Subject: Simplify fold_single_bit_test slightly X-Git-Tag: basepoints/gcc-15~9127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d2fdcab162365caa23e5ade92d1404737e9b600;p=thirdparty%2Fgcc.git Simplify fold_single_bit_test slightly Now the only use of fold_single_bit_test is in do_store_flag, we can change it such that to pass the inner arg and bitnum instead of building a tree. There is no code generation changes due to this change, only a decrease in GC memory that is produced during expansion. gcc/ChangeLog: * expr.cc (fold_single_bit_test): Take inner and bitnum instead of arg0 and arg1. Update the code. (do_store_flag): Don't create a tree when calling fold_single_bit_test instead just call it with the bitnum and the inner tree. --- diff --git a/gcc/expr.cc b/gcc/expr.cc index a61772b68080..67a9f82ca174 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -12899,23 +12899,19 @@ maybe_optimize_sub_cmp_0 (enum tree_code code, tree *arg0, tree *arg1) } -/* If CODE with arguments ARG0 and ARG1 represents a single bit +/* If CODE with arguments INNER & (1<