]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
SVE Intrinsics: Change return type of redirect_call to gcall.
authorJennifer Schmitz <jschmitz@nvidia.com>
Tue, 23 Jul 2024 10:54:50 +0000 (03:54 -0700)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Thu, 25 Jul 2024 06:47:58 +0000 (12:17 +0530)
As suggested in the review of
https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657474.html,
this patch changes the return type of gimple_folder::redirect_call from
gimple * to gcall *. The motivation for this is that so far, most callers of
the function had been casting the result of the function to gcall. These
call sites were updated.

The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
OK for mainline?

Signed-off-by: Jennifer Schmitz <jschmitz@nvidia.com>
gcc/

* config/aarch64/aarch64-sve-builtins.cc
(gimple_folder::redirect_call): Update return type.
* config/aarch64/aarch64-sve-builtins.h: Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.cc (svqshl_impl::fold):
Remove cast to gcall.
(svrshl_impl::fold): Likewise.

gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
gcc/config/aarch64/aarch64-sve-builtins.cc
gcc/config/aarch64/aarch64-sve-builtins.h

index 4f25cc68028291672a133ebae7d416ccf7c1d22c..dc5915516825bab15b28d3e5639a23e55079fffc 100644 (file)
@@ -349,7 +349,7 @@ public:
                instance.base_name = "svlsr";
                instance.base = functions::svlsr;
              }
-           gcall *call = as_a <gcall *> (f.redirect_call (instance));
+           gcall *call = f.redirect_call (instance);
            gimple_call_set_arg (call, 2, amount);
            return call;
          }
@@ -379,7 +379,7 @@ public:
            function_instance instance ("svlsl", functions::svlsl,
                                        shapes::binary_uint_opt_n, MODE_n,
                                        f.type_suffix_ids, GROUP_none, f.pred);
-           gcall *call = as_a <gcall *> (f.redirect_call (instance));
+           gcall *call = f.redirect_call (instance);
            gimple_call_set_arg (call, 2, amount);
            return call;
          }
@@ -392,7 +392,7 @@ public:
            function_instance instance ("svrshr", functions::svrshr,
                                        shapes::shift_right_imm, MODE_n,
                                        f.type_suffix_ids, GROUP_none, f.pred);
-           gcall *call = as_a <gcall *> (f.redirect_call (instance));
+           gcall *call = f.redirect_call (instance);
            gimple_call_set_arg (call, 2, amount);
            return call;
          }
index f3983a123e354a7626d4646363883d444fa6b8a5..0a560eaedca14832bfacef3225bd467691e16e99 100644 (file)
@@ -3592,7 +3592,7 @@ gimple_folder::load_store_cookie (tree type)
 }
 
 /* Fold the call to a call to INSTANCE, with the same arguments.  */
-gimple *
+gcall *
 gimple_folder::redirect_call (const function_instance &instance)
 {
   registered_function *rfn
index 9cc07d5fa3debb855e787a0874a4c94bcaec65db..9ab6f202c30629babcf30d2a9594a7cba83abb5d 100644 (file)
@@ -629,7 +629,7 @@ public:
   tree fold_contiguous_base (gimple_seq &, tree);
   tree load_store_cookie (tree);
 
-  gimple *redirect_call (const function_instance &);
+  gcall *redirect_call (const function_instance &);
   gimple *redirect_pred_x ();
 
   gimple *fold_to_cstu (poly_uint64);