> 
> Hi Honza,
> 
> This is more a note for other interested AArch64 testers, but this patch
> breaks some tests on aarch64-none-elf. Looking at the test output, this
> is a problem with the tests than with your patch. We now eliminate some
> function bodies which are identical across test functions, causing us to
> fail some scan-assembler directives.
> 
> The fix is straightforward, we just need to add -fno-ipa-icf to get things
> working again. This keeps the spirit of the original tests. I'll propose
> a patch along those lines on Monday.
> 
> Thanks,
> James
> 
> ---
> 
>         PASS->FAIL: gcc.target/aarch64/atomic-comp-swap-release-acquire.c 
> scan-assembler-times ldaxr\tw[0-9]+, \\[x[0-9]+\\] 4
>         PASS->FAIL: gcc.target/aarch64/atomic-comp-swap-release-acquire.c 
> scan-assembler-times stlxr\tw[0-9]+, w[0-9]+, \\[x[0-9]+\\] 4
>         PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times 
> saddl2\tv[0-9]+.2d, v[0-9]+.4s, v[0-9]+.4s 2
>         PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times 
> saddl\tv[0-9]+.2d, v[0-9]+.2s, v[0-9]+.2s 2
>         PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times 
> ssubl2\tv[0-9]+.2d, v[0-9]+.4s, v[0-9]+.4s 5
>         PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times 
> ssubl\tv[0-9]+.2d, v[0-9]+.2s, v[0-9]+.2s 5
>         PASS->FAIL: gcc.target/aarch64/vect_smlal_1.c scan-assembler-times 
> smlsl2\tv[0-9]+.8h 5
>         PASS->FAIL: gcc.target/aarch64/vect_smlal_1.c scan-assembler-times 
> smlsl\tv[0-9]+.8h 5

Thanks, yes adding -fno-ipa-icf is a proper fix for tests like this.
What happened was a logic bug in old implementation of merge routine.  When
symbol is externally visible it decided to create a wrapper (to preserve
potential address compares) and to avoid wrapper cost redirect all direct
uses.

There was extra else between redirection and thunk creation, so often it
redirected calls but it kept old function body in code.  We now see a lot more
DCE tham before.

i386 tests also needed a compensation at two places.

Honza

Reply via email to