toy windowing auto-vec miss
Bruce Carneal
bcarneal at gmail.com
Mon Nov 7 18:14:44 UTC 2022
On Monday, 7 November 2022 at 16:49:24 UTC, Johan wrote:
> On Monday, 7 November 2022 at 01:59:03 UTC, Bruce Carneal wrote:
>> Here's a simple godbolt example of one of the areas in which
>> gdc solidly outperforms ldc wrt auto-vectorization: simple but
>> not trivial operand gather
>> https://godbolt.org/z/ox1vvxd8s
>
> Don't have time to dive deeper but I found that:
> Removing `@restrict` results in vectorized instructions with
> LDC (don't know if it is faster, just that they appear in ASM).
>
> -Johan
That's very interesting.
This is the first time I've heard of @restrict making things
worse wrt auto vectorization. From what I've seen in other
experiments, @restrict provides a minor benefit (code size
reduction) frequently while occasionally enabling vectorization
of otherwise complex dependency graphs.
Thanks for the heads up.
More information about the digitalmars-d-ldc
mailing list