Hi,

On Tue, Nov 03 2026, Andrew MacLeod wrote:
> This patch removes the specialization for pointers when they did not have 
> bitmasks.
>
> I think it is correct... but there is a alight difference...  the old
> pointer code was guarded by pt_for_fn (node->decl, flag_ipa_bit_cp),
> but the integer code was not...  The set_range_info (ddef, tmp); would
> always set the bitmask regardess of hte flag, and with pointers now
> having bitmaks, they do the same thing...
>

In this regard the change is fine, this is transformation code and so if
the flag is false, the vector of value ranges to set should be empty.

I trust you that the special pointer code now indeed is not necessary
and so the change is OK.

Martin



> I presume the desired behaviour wouold be to have pointers do the same 
> thing.. which perserves the bitmask and therefore the alignment.. always, 
> regardless of that flag.  Is that the correct call?  get_ptr_alignment simply 
> picks things up from the bitmask anyway now.
>
> Without all the special pointer code, the output in a couple of testcases 
> need to be adjusted.
>
> Bootstraps on  x86_64-pc-linux-gnu with no regressions.  OK for trunk?
>
> Andrew
>
>
>
> With pointers having global ranges now, the bitmask maintains all
> alignment info so no need to do special alignment copying.
>
>       gcc/
>       * ipa-prop.cc (ipcp_update_vr): Pointers have global bitmasks
>       now which contain the alignment info.
>
>       gcc/testsuite/
>       * gcc.dg/ipa/propalign-1.c: Adjust for new output.
>       * gcc.dg/ipa/propalign-2.c: Adjust for new output.
>       * gcc.dg/ipa/propalign-4.c: Adjust for new output.
>       * gcc.dg/ipa/propalign-5.c: Adjust for new output.

Reply via email to