* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
@ 2022-02-11 9:26 ` avieira at gcc dot gnu.org
2022-02-11 10:27 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: avieira at gcc dot gnu.org @ 2022-02-11 9:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #1 from avieira at gcc dot gnu.org ---
Forgot to mention, this happens during the sched1 pass.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
2022-02-11 9:26 ` [Bug rtl-optimization/104498] " avieira at gcc dot gnu.org
@ 2022-02-11 10:27 ` rguenth at gcc dot gnu.org
2022-02-11 11:52 ` avieira at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-11 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I don't see how it can with those MEMs. Can you show the canonicalized (CSELIB
expanded) RTXen the base_alias_check routine sees?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
2022-02-11 9:26 ` [Bug rtl-optimization/104498] " avieira at gcc dot gnu.org
2022-02-11 10:27 ` rguenth at gcc dot gnu.org
@ 2022-02-11 11:52 ` avieira at gcc dot gnu.org
2022-02-11 12:10 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: avieira at gcc dot gnu.org @ 2022-02-11 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #3 from avieira at gcc dot gnu.org ---
Sorry some confusion there, I thought it was base_alias_check bailing out
early, but that seems to return true, it is the memrefs_conflict_p that returns
0.
I suspect rtx_equal_for_memref_p should have returned 1 for:
x:
(plus:DI (mult:DI (reg:DI 99 [ off.0_1 ])
(const_int 4 [0x4]))
(const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
(const_int 16 [0x10]))))
and y:
(plus:DI (mult:DI (reg:DI 99 [ off.0_1 ])
(const_int 4 [0x4]))
(symbol_ref:DI ("b") [flags 0x2] <var_decl 0xfffff7635f30 b>))
But it does not... must be because of that trailing (equivalence notes? that's
what I assume they are?)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (2 preceding siblings ...)
2022-02-11 11:52 ` avieira at gcc dot gnu.org
@ 2022-02-11 12:10 ` rguenth at gcc dot gnu.org
2022-02-11 12:50 ` avieira at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-11 12:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to avieira from comment #3)
> Sorry some confusion there, I thought it was base_alias_check bailing out
> early, but that seems to return true, it is the memrefs_conflict_p that
> returns 0.
>
> I suspect rtx_equal_for_memref_p should have returned 1 for:
> x:
> (plus:DI (mult:DI (reg:DI 99 [ off.0_1 ])
> (const_int 4 [0x4]))
> (const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
> (const_int 16 [0x10]))))
>
> and y:
> (plus:DI (mult:DI (reg:DI 99 [ off.0_1 ])
> (const_int 4 [0x4]))
> (symbol_ref:DI ("b") [flags 0x2] <var_decl 0xfffff7635f30 b>))
>
> But it does not... must be because of that trailing (equivalence notes?
> that's what I assume they are?)
It's the section anchor that breaks things. There's a duplicate bug about this
somewhere, or a thread on the mailing list. But IIRC Richard had fixed this?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (3 preceding siblings ...)
2022-02-11 12:10 ` rguenth at gcc dot gnu.org
@ 2022-02-11 12:50 ` avieira at gcc dot gnu.org
2022-02-11 13:21 ` rsandifo at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: avieira at gcc dot gnu.org @ 2022-02-11 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #5 from avieira at gcc dot gnu.org ---
You mean this https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92294
it only works for direct symbols I think it never enters
the block under: if (GET_CODE (x) == SYMBOL_REF && GET_CODE (y) == SYMBOL_REF)
which is where he made his changes. I'll go try to understand his changes
better, just had a quick look over.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (4 preceding siblings ...)
2022-02-11 12:50 ` avieira at gcc dot gnu.org
@ 2022-02-11 13:21 ` rsandifo at gcc dot gnu.org
2022-02-11 13:56 ` avieira at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-02-11 13:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-02-11
Status|UNCONFIRMED |NEW
--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
The problem is that compare_base_symbol_refs can swap x and y:
if (!x_decl)
{
std::swap (x_decl, y_decl);
std::swap (x_base, y_base);
}
but this doesn't change the polarity of the distance added here:
if (distance)
*distance += (SYMBOL_REF_BLOCK_OFFSET (y_base)
- SYMBOL_REF_BLOCK_OFFSET (x_base));
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (5 preceding siblings ...)
2022-02-11 13:21 ` rsandifo at gcc dot gnu.org
@ 2022-02-11 13:56 ` avieira at gcc dot gnu.org
2022-02-11 14:31 ` rsandifo at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: avieira at gcc dot gnu.org @ 2022-02-11 13:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #7 from avieira at gcc dot gnu.org ---
And I was thinking it didn't know how to handle anchor + offset...
Anyway if I just record the swap and use it to invert the distance calculation
that seems to 'work' for the testcase. I'm happy to go bootstrap it, or would
you rather fix this some other way?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (6 preceding siblings ...)
2022-02-11 13:56 ` avieira at gcc dot gnu.org
@ 2022-02-11 14:31 ` rsandifo at gcc dot gnu.org
2022-02-21 9:45 ` cvs-commit at gcc dot gnu.org
2022-02-21 11:39 ` avieira at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-02-11 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #8 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
No, negating the offset seems like the right fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (7 preceding siblings ...)
2022-02-11 14:31 ` rsandifo at gcc dot gnu.org
@ 2022-02-21 9:45 ` cvs-commit at gcc dot gnu.org
2022-02-21 11:39 ` avieira at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-21 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:d34cdec56728ddbdfacabd9f80598b17d1c6ff54
commit r12-7310-gd34cdec56728ddbdfacabd9f80598b17d1c6ff54
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Mon Feb 21 09:41:53 2022 +0000
rtl-optimization/104498: Fix comparing symbol reference
gcc/ChangeLog:
PR rtl-optimization/104498
* alias.cc (compare_base_symbol_refs): Correct distance computation
when swapping x and y.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/104498] Alias attribute being ignored by scheduler
2022-02-11 9:25 [Bug rtl-optimization/104498] New: Alias attribute being ignored by scheduler avieira at gcc dot gnu.org
` (8 preceding siblings ...)
2022-02-21 9:45 ` cvs-commit at gcc dot gnu.org
@ 2022-02-21 11:39 ` avieira at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: avieira at gcc dot gnu.org @ 2022-02-21 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104498
avieira at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from avieira at gcc dot gnu.org ---
Should be fixed with latest patch.
^ permalink raw reply [flat|nested] 11+ messages in thread