Elektrine lite

← Feed

@horenmar@mastodon.social

Post #1977165

2026-04-20 07:06 UTC

Fun: With O2, GCC sees the UB in this code and then optimizes it away. With O3 it instead vectorizes it aggressively. https://godbolt.org/z/P6cEjhx4M

Replies (1)

  • @pinskia@hachyderm.io 2026-04-21 00:56

    @horenmar@mastodon.social At -O3, GCC partial inlines ippsDotProd_16s64s and since modref pass is run before the splitting, then the split off part does NOT have the aliasing info attached to it so the undefined code accidently becomes well behaved at -O3.

    Open ##2422655