https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117584
--- Comment #14 from Manjunath S Matti <mmatti at linux dot vnet.ibm.com> ---
(In reply to Jakub Jelinek from comment #13)
> So, regarding the #c11 issue, I had a look and e.g. on
> gcc.dg/torture/bitint-102.c at -O0 that hunk is triggered on s390x-linux too
> (I was testing a cross from x86_64).
> --- gcc/gimple-lower-bitint.cc.jj 2026-07-28 14:13:06.606033272 +0200
> +++ gcc/gimple-lower-bitint.cc 2026-07-28 16:02:01.197392027 +0200
> @@ -4583,8 +4583,9 @@ bitint_large_huge::finish_arith_overflow
> build_fold_addr_expr (unshare_expr (obj)), off);
> g = gimple_build_call (fn, 3,
> build_fold_addr_expr (unshare_expr (obj)),
> - src, build_int_cst (size_type_node,
> - obj_nelts * m_limb_size));
> + build_fold_addr_expr (src),
> + build_int_cst (size_type_node,
> + obj_nelts * m_limb_size));
> insert_before (g);
> }
> if (orig_obj == NULL_TREE && obj)
> changes
> --- bitint-102.c.272t.optimized_ 2026-07-28 16:01:35.186720765 +0200
> +++ bitint-102.c.272t.optimized 2026-07-28 16:02:19.056166321 +0200
> @@ -211,7 +211,7 @@ int foo (signed char x, A y)
>
> <bb 13> :
> # _89 = PHI <0(12), 1(10), 1(11)>
> - __builtin_memmove (&bitint.12, MEM <unsigned long[8]> [(unsigned long[16]
> *)&bitint.12 + 64B], 64);
> + __builtin_memmove (&bitint.12, &MEM <unsigned long[8]> [(unsigned
> long[16] *)&bitint.12 + 64B], 64);
> _90 = (unsigned long) _89;
> MEM[(unsigned long *)&bitint.12 + 120B] = _90;
> MEM <unsigned long[7]> [(unsigned long[16] *)&bitint.12 + 64B] = {};
> at -O0, with -O2 signficantly more, and in assembly in both cases a lot of
> differences.
Thank you for this information. I am in discussion with Mike on the ABI and
limb mode that would be more suitable, considering the older 32-bit systems we
have in PPC. I did not find time to test the change in #c11 s390x, I intend to
do it before I propose the patch.
I will need to change this patch based on the PowerPC ABI updates. If we
consider DI or SI as the standard limb mode then, the current infra for bitint
looks good to me. But I am not sure if we support TI in PPC64 BE, how would
things turn out. I will keep you posted.
Thanks.