On Mon, Aug 31, 2026 at 7:34 AM H.J. Lu <[email protected]> wrote:
>
> Since ZERO_EXTEND TImode store isn't an SSE to integer register move,
> treat it as store.
For a single ZERO_EXTEND TImode store, movq + movaps is generated, so
treating it as store is not correct.
The issue in your PR, is not related to the cost of ZERO_EXTEND with
memory dest, it's pass_stv is not aware that movq can be CSEed if
they're from the same GPR.
I don't think it's correct to adjust the cost of ZERO_EXTEND when dest
is memory, it's more like limitation of stv don't know further
optimization in later rtl passes.

>
> gcc/
>
> PR target/127020
> * config/i386/i386-features.cc
> (timode_scalar_chain::compute_convert_gain): Treat ZERO_EXTEND
> TImode store as store.
>
> gcc/testsuite/
>
> PR target/127020
> * gcc.target/i386/sse4_1-stv-15.c: New file.
>
> --
> H.J.



-- 
BR,
Hongtao

Reply via email to