[Bug target/104327] [12 Regression] Inlining error on s390x since r12-1039
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 3 08:50:32 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104327
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andreas Krebbel from comment #5)
> Yes, that's the right fix I think. Thanks!
> MVCLE is a shorter version of a loop doing MVCs but has some startup
> overhead.
I would factor it out a bit:
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 2db12d4ba4b..95351c8a002 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -16105,8 +16105,10 @@ s390_can_inline_p (tree caller, tree callee)
struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree);
bool ret = true;
- if ((caller_opts->x_target_flags & ~(MASK_SOFT_FLOAT | MASK_HARD_DFP))
- != (callee_opts->x_target_flags & ~(MASK_SOFT_FLOAT | MASK_HARD_DFP)))
+ unsigned HOST_WIDE_INT inline_safe_mask
+ = MASK_SOFT_FLOAT | MASK_HARD_DFP | MASK_MVCLE;
+ if ((caller_opts->x_target_flags & ~inline_safe_mask)
+ != (callee_opts->x_target_flags & ~inline_safe_mask))
ret = false;
/* Don't inline functions to be compiled for a more recent arch into a
@Andreas: Can you please add a test case for it, test it and finish the patch?
Thanks.
More information about the Gcc-bugs
mailing list